Browse Source

macOS: Make the behaviour of ComponentPeer::grabFocus match the other platforms

This partially reverts f43784dc: "macOS:  Propagate focus loss message when resigning key window status and only grab focus if window can become the key window"
pull/22/head
Tom Poole 3 years ago
parent
commit
165d8b0ecd
2 changed files with 2 additions and 3 deletions
  1. +1
    -1
      modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
  2. +1
    -2
      modules/juce_gui_basics/windows/juce_ComponentPeer.h

+ 1
- 1
modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm View File

@@ -1558,7 +1558,7 @@ public:
void grabFocus() override
{
if (window != nil && [window canBecomeKeyWindow])
if (window != nil)
{
[window makeKeyWindow];
[window makeFirstResponder: view];


+ 1
- 2
modules/juce_gui_basics/windows/juce_ComponentPeer.h View File

@@ -70,8 +70,7 @@ public:
performAnyPendingRepaintsNow() method is called. */
windowIgnoresKeyPresses = (1 << 10), /**< Tells the window not to catch any keypresses. This can
be used for things like plugin windows, to stop them interfering
with the host's shortcut keys. This will prevent the window from
gaining keyboard focus. */
with the host's shortcut keys. */
windowIsSemiTransparent = (1 << 30) /**< Not intended for public use - makes a window transparent. */
};


Loading…
Cancel
Save