From 03909cb24ab6f5648e7fc6e696024ca460b37070 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 15 Sep 2015 12:26:03 +0200 Subject: NEWT Window Maximize: re-gain focus after maximize action (maybe lost on platforms, i.e. OSX) --- src/newt/classes/jogamp/newt/WindowImpl.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/newt/classes/jogamp') 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 { -- cgit v1.2.3