aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-12-03 21:54:57 +0100
committerSven Gothel <[email protected]>2013-12-03 21:54:57 +0100
commit0237bde0f3c13d393c3942b41f79656a80fd578d (patch)
treed8731ebd9acbde766600dcddccefc4414d68ba7c /src/newt/classes/jogamp
parent354b0b370bbfd14743267a9466f5e91e4d218a42 (diff)
Bug 914: Newt OSX: Reset NSApp's presentationOptions @ windowClose0() / Assume having focus in fullscreen-mode
- Reset NSApp's presentationOptions @ windowClose0() Commit 69c334448cfe8af553fd97689137ecf8f996b378 started using the [NSApp setPresentationOptions: opts] but missed to reset to defaults @ windowClose0(); - Assume having focus in fullscreen-mode NewtMacWindow::windowDidBecomeKey()' is not always called in fullscreen-mode! Note: OSX Fullscreen from a browser still shows the browser title-bar until mouse-click. Don't know how to avoid this. Minor issue..
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java14
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java15
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 */