aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-09-15 12:26:03 +0200
committerSven Gothel <[email protected]>2015-09-15 12:26:03 +0200
commit03909cb24ab6f5648e7fc6e696024ca460b37070 (patch)
tree0d7f917952f31629504d3f0a121c553772524c19 /src/newt
parent713c3c3fa953d8561ebc6a52cfee7eadde661bf1 (diff)
NEWT Window Maximize: re-gain focus after maximize action (maybe lost on platforms, i.e. OSX)
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java5
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 {