aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2013-12-19 12:50:02 +0100
committerSven Gothel <sgothel@jausoft.com>2013-12-19 12:50:02 +0100
commit0e1b4bf1b17b10933c3ccdfea5cef7eca6aad2fb (patch)
treeee8d28768913a05a7ce69e81ead3b4a88c6270c7 /src/newt
parentb4e03a5168f62223369a483924eb2491250c6f95 (diff)
Bug 924: X11 WindowDriver: Only perform 'tempFSAlwaysOnTop' toggle @ focusChanged(..) if isFullscreen()
.. otherwise it will be triggered by reconfigure tasks while enabling/disabling fullscreen.
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
index 5e1f7a6ed..f2a27b0c9 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
@@ -148,20 +148,21 @@ public class WindowDriver extends WindowImpl {
@Override
protected boolean reconfigureWindowImpl(final int x, final int y, final int width, final int height, int flags) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window reconfig: "+x+"/"+y+" "+width+"x"+height+", "+ getReconfigureFlagsAsString(null, flags));
- }
final int _x, _y;
- if(0 == ( FLAG_IS_UNDECORATED & flags)) {
- final InsetsImmutable i = getInsets();
-
+ final InsetsImmutable _insets;
+ if( 0 == ( FLAG_IS_UNDECORATED & flags) ) {
// client position -> top-level window position
- _x = x - i.getLeftWidth() ;
- _y = y - i.getTopHeight() ;
+ _insets = getInsets();
+ _x = x - _insets.getLeftWidth() ;
+ _y = y - _insets.getTopHeight() ;
} else {
+ _insets = null;
_x = x;
_y = y;
}
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window reconfig: "+x+"/"+y+" -> "+_x+"/"+_y+" "+width+"x"+height+", insets "+_insets+", "+ getReconfigureFlagsAsString(null, flags));
+ }
if( 0 != ( FLAG_CHANGE_FULLSCREEN & flags ) ) {
if( 0 != ( FLAG_IS_FULLSCREEN & flags) && 0 == ( FLAG_IS_ALWAYSONTOP & flags) ) {
tempFSAlwaysOnTop = true;
@@ -196,7 +197,7 @@ public class WindowDriver extends WindowImpl {
*/
@Override
protected void focusChanged(boolean defer, boolean focusGained) {
- if( tempFSAlwaysOnTop && hasFocus() != focusGained && isNativeValid() ) {
+ if( isNativeValid() && isFullscreen() && tempFSAlwaysOnTop && hasFocus() != focusGained ) {
final int flags = getReconfigureFlags(FLAG_CHANGE_ALWAYSONTOP, isVisible()) | ( focusGained ? FLAG_IS_ALWAYSONTOP : 0 );
if(DEBUG_IMPLEMENTATION) {
System.err.println("X11Window reconfig.3 (focus): temporary "+getReconfigureFlagsAsString(null, flags));