From fcbd67ddd4c866b664db2c8b5f292996f277a4ac Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 31 Aug 2015 05:51:13 +0200 Subject: Bug 1188: Refine getSupportedStateMask() semantics and minimum requirements (adding STATE_MASK_FULLSCREEN) Refine getSupportedStateMask(): - always for _after_ native creation, i.e. first visibility - removed STATE_MASK_AUTOPOSITION - adding STATE_MASK_FULLSCREEN to minimum requirements --- src/newt/classes/jogamp/newt/OffscreenWindow.java | 3 +-- src/newt/classes/jogamp/newt/WindowImpl.java | 4 ++-- src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java | 1 - src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java | 3 +-- src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java | 2 -- src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java | 2 -- src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java | 2 +- 7 files changed, 5 insertions(+), 12 deletions(-) (limited to 'src/newt/classes/jogamp') diff --git a/src/newt/classes/jogamp/newt/OffscreenWindow.java b/src/newt/classes/jogamp/newt/OffscreenWindow.java index 8b99541b3..f4b8ecd42 100644 --- a/src/newt/classes/jogamp/newt/OffscreenWindow.java +++ b/src/newt/classes/jogamp/newt/OffscreenWindow.java @@ -117,8 +117,7 @@ public class OffscreenWindow extends WindowImpl implements MutableSurface { @Override protected final int getSupportedReconfigMaskImpl() { - return minimumReconfigStateMask | - STATE_MASK_FULLSCREEN; // due to size change + return minimumReconfigStateMask; } @Override diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index 1f91a759c..21105ba51 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -254,8 +254,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer /* pp */ final Bitfield stateMask = Bitfield.Factory.synchronize(Bitfield.Factory.create(32)); /** Default is all but {@link #STATE_MASK_FULLSCREEN_SPAN}. */ protected int supportedReconfigStateMask = 0; - /** See {@link #getSupportedStateMask()}, i.e. {@link #STATE_MASK_VISIBLE} | {@link #STATE_MASK_FOCUSED}. */ - protected static final int minimumReconfigStateMask = STATE_MASK_VISIBLE | STATE_MASK_FOCUSED; + /** See {@link #getSupportedStateMask()}, i.e. {@link #STATE_MASK_VISIBLE} | {@link #STATE_MASK_FOCUSED} | {@link STATE_MASK_FULLSCREEN}. */ + protected static final int minimumReconfigStateMask = STATE_MASK_VISIBLE | STATE_MASK_FOCUSED | STATE_MASK_FULLSCREEN; /* pp */ final void resetStateMask() { stateMask.clearField(false); diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java index 315a41b1f..b0a4ee34a 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java @@ -257,7 +257,6 @@ public class WindowDriver extends WindowImpl { // STATE_MASK_RESIZABLE | // STATE_MASK_MAXIMIZED_VERT | // STATE_MASK_MAXIMIZED_HORZ | - STATE_MASK_FULLSCREEN | // due to size change STATE_MASK_POINTERVISIBLE | STATE_MASK_POINTERCONFINED; } diff --git a/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java index 4319bedc1..ce5d208db 100644 --- a/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java @@ -96,8 +96,7 @@ public class WindowDriver extends WindowImpl { @Override protected final int getSupportedReconfigMaskImpl() { - return minimumReconfigStateMask | - STATE_MASK_FULLSCREEN; + return minimumReconfigStateMask; } @Override diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java index 5f90b29f4..a38ba4c13 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java @@ -392,7 +392,6 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl @Override protected final int getSupportedReconfigMaskImpl() { return minimumReconfigStateMask | - STATE_MASK_AUTOPOSITION | STATE_MASK_CHILDWIN | STATE_MASK_UNDECORATED | STATE_MASK_ALWAYSONTOP | @@ -401,7 +400,6 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl STATE_MASK_RESIZABLE | STATE_MASK_MAXIMIZED_VERT | STATE_MASK_MAXIMIZED_HORZ | - STATE_MASK_FULLSCREEN | STATE_MASK_POINTERVISIBLE | STATE_MASK_POINTERCONFINED; } diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java index 70a8ec558..c1aa4cb90 100644 --- a/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java @@ -202,7 +202,6 @@ public class WindowDriver extends WindowImpl { @Override protected final int getSupportedReconfigMaskImpl() { return minimumReconfigStateMask | - STATE_MASK_AUTOPOSITION | STATE_MASK_CHILDWIN | STATE_MASK_UNDECORATED | STATE_MASK_ALWAYSONTOP | @@ -211,7 +210,6 @@ public class WindowDriver extends WindowImpl { STATE_MASK_RESIZABLE | STATE_MASK_MAXIMIZED_VERT | STATE_MASK_MAXIMIZED_HORZ | - STATE_MASK_FULLSCREEN | STATE_MASK_POINTERVISIBLE | STATE_MASK_POINTERCONFINED; } diff --git a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java index 5749f0dc3..9e1d2869b 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java @@ -170,7 +170,7 @@ public class WindowDriver extends WindowImpl { @Override protected final int getSupportedReconfigMaskImpl() { - return GetSupportedReconfigMask0(javaWindowHandle) & STATE_MASK_ALL_RECONFIG; + return ( minimumReconfigStateMask | GetSupportedReconfigMask0(javaWindowHandle) ) & STATE_MASK_ALL_RECONFIG; } @Override -- cgit v1.2.3