diff options
Diffstat (limited to 'src/newt/classes')
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 14 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java | 15 |
2 files changed, 17 insertions, 12 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index d62a19f44..21343b263 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -674,37 +674,37 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer if( 0 != ( FLAG_CHANGE_PARENTING & flags) ) { sb.append("*"); } - sb.append("PARENT_"); + sb.append("PARENT "); sb.append(0 != ( FLAG_HAS_PARENT & flags)); sb.append(", "); if( 0 != ( FLAG_CHANGE_FULLSCREEN & flags) ) { sb.append("*"); } - sb.append("FS_"); + sb.append("FS "); sb.append(0 != ( FLAG_IS_FULLSCREEN & flags)); - sb.append("_span_"); + sb.append("[span "); sb.append(0 != ( FLAG_IS_FULLSCREEN_SPAN & flags)); - sb.append(", "); + sb.append("], "); if( 0 != ( FLAG_CHANGE_DECORATION & flags) ) { sb.append("*"); } - sb.append("UNDECOR_"); + sb.append("UNDECOR "); sb.append(0 != ( FLAG_IS_UNDECORATED & flags)); sb.append(", "); if( 0 != ( FLAG_CHANGE_ALWAYSONTOP & flags) ) { sb.append("*"); } - sb.append("ALWAYSONTOP_"); + sb.append("ALWAYSONTOP "); sb.append(0 != ( FLAG_IS_ALWAYSONTOP & flags)); sb.append(", "); if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) { sb.append("*"); } - sb.append("VISIBLE_"); + sb.append("VISIBLE "); sb.append(0 != ( FLAG_IS_VISIBLE & flags)); sb.append("]"); diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java index 7db3e2aab..641d7437c 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java @@ -170,14 +170,20 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl @Override protected void requestFocusImpl(final boolean force) { + final boolean _isFullscreen = isFullscreen(); + final boolean _isOffscreenInstance = isOffscreenInstance; if(DEBUG_IMPLEMENTATION) { - System.err.println("MacWindow: requestFocusImpl(), isOffscreenInstance "+isOffscreenInstance); + System.err.println("MacWindow: requestFocusImpl(), isOffscreenInstance "+_isOffscreenInstance+", isFullscreen "+_isFullscreen); } - if(!isOffscreenInstance) { + if(!_isOffscreenInstance) { OSXUtil.RunOnMainThread(false, new Runnable() { @Override public void run() { requestFocus0(getWindowHandle(), force); + if(_isFullscreen) { + // 'NewtMacWindow::windowDidBecomeKey()' is not always called in fullscreen-mode! + focusChanged(false, true); + } } } ); } else { focusChanged(false, true); @@ -516,7 +522,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl @Override public void run() { initWindow0( parentWinHandle, newWin, pS.getX(), pS.getY(), width, height, - isOpaque, fullscreen, visible && !offscreenInstance, surfaceHandle); + isOpaque, visible && !offscreenInstance, surfaceHandle); if( offscreenInstance ) { orderOut0(0!=parentWinHandle ? parentWinHandle : newWin); } else { @@ -534,8 +540,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl private native long createView0(int x, int y, int w, int h, boolean fullscreen); private native long createWindow0(int x, int y, int w, int h, boolean fullscreen, int windowStyle, int backingStoreType, long view); /** Must be called on Main-Thread */ - private native void initWindow0(long parentWindow, long window, int x, int y, int w, int h, - boolean opaque, boolean fullscreen, boolean visible, long view); + private native void initWindow0(long parentWindow, long window, int x, int y, int w, int h, boolean opaque, boolean visible, long view); private native boolean lockSurface0(long window, long view); private native boolean unlockSurface0(long window, long view); /** Must be called on Main-Thread */ |