diff options
author | Sven Gothel <[email protected]> | 2014-05-27 19:56:43 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-05-27 19:56:43 +0200 |
commit | fcd59768d776e202d3b03b7a9fee2aac69b3b663 (patch) | |
tree | f88f69cc4a2170b8147b5ae31d8f31bdba15ab4a /src/newt/classes/jogamp | |
parent | bcda2dad1a6569ffd4eba07b231d50fdafc60b7f (diff) |
Bug 741 HiDPI: Fix OSX NEWT Offscreen Size Regression from commit 56d60b36798fa8dae48bf2aa5e2de6f3178ab0d1
Fix regression of commit 56d60b36798fa8dae48bf2aa5e2de6f3178ab0d1:
createWindow(..) was issuing sizeChanged(..) to ensure size notification,
however - the offscreen case used the dummy size 64x64.
Fix issues the notifications in caller w/ true size.
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java index fe9d4a08e..cd852bb09 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java @@ -385,11 +385,16 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl 0 != ( FLAG_CHANGE_PARENTING & flags) || 0 != ( FLAG_CHANGE_FULLSCREEN & flags) ) { if(isOffscreenInstance) { - createWindow(true, 0 != getWindowHandle(), pClientLevelOnSreen, x, y, 64, 64, false, setVisible, false); + createWindow(true, 0 != getWindowHandle(), pClientLevelOnSreen, 64, 64, false, setVisible, false); } else { - createWindow(false, 0 != getWindowHandle(), pClientLevelOnSreen, x, y, width, height, + createWindow(false, 0 != getWindowHandle(), pClientLevelOnSreen, width, height, 0 != ( FLAG_IS_FULLSCREEN & flags), setVisible, 0 != ( FLAG_IS_ALWAYSONTOP & flags)); } + // no native event (fullscreen, some reparenting) + positionChanged(false, x, y); + updatePixelScaleByWindowHandle(false /* sendEvent */); + super.sizeChanged(false, width, height, true); + visibleChanged(false, setVisible); } else { if( width>0 && height>0 ) { if( !isOffscreenInstance ) { @@ -577,8 +582,8 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl // private void createWindow(final boolean offscreenInstance, final boolean recreate, - final PointImmutable pS, final int x, final int y, - final int width, final int height, final boolean fullscreen, final boolean visible, final boolean alwaysOnTop) { + final PointImmutable pS, final int width, final int height, + final boolean fullscreen, final boolean visible, final boolean alwaysOnTop) { final long parentWinHandle = getParentWindowHandle(); final long preWinHandle = getWindowHandle(); @@ -637,11 +642,6 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl setAlwaysOnTop0(getWindowHandle(), alwaysOnTop); } } } ); - // no native event (fullscreen, some reparenting) - positionChanged(false, x, y); - updatePixelScaleByWindowHandle(false /* sendEvent */); - super.sizeChanged(false, width, height, true); - visibleChanged(false, visible); } catch (Exception ie) { ie.printStackTrace(); } |