diff options
author | Sven Gothel <[email protected]> | 2015-09-15 12:26:03 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-09-15 12:26:03 +0200 |
commit | 03909cb24ab6f5648e7fc6e696024ca460b37070 (patch) | |
tree | 0d7f917952f31629504d3f0a121c553772524c19 /src | |
parent | 713c3c3fa953d8561ebc6a52cfee7eadde661bf1 (diff) |
NEWT Window Maximize: re-gain focus after maximize action (maybe lost on platforms, i.e. OSX)
Diffstat (limited to 'src')
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index 6735262ff..4e33bfd9d 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -2186,6 +2186,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } if( 0 != cmask ) { if( isNativeValid() ) { + final boolean focused = hasFocus(); // Mirror pos/size so native change notification can get overwritten final int x = getX(); final int y = getY(); @@ -2197,6 +2198,10 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer reconfigureWindowImpl(x, y, width, height, getReconfigureMask(cmask, isVisible())); display.dispatchMessagesNative(); // status up2date + + if(focused) { + requestFocusInt( 0 == parentWindowHandle /* skipFocusAction if top-level */); + } } } } finally { |