diff options
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 12 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java | 2 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index a0ee5c2b2..55b735b4f 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -1168,9 +1168,14 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer public final void run() { windowLock.lock(); try { - if(!fullscreen && isNativeValid() && WindowImpl.this.undecorated != undecorated) { - WindowImpl.this.undecorated = undecorated; - // mirror pos/size so native change notification can get overwritten + if(WindowImpl.this.undecorated != undecorated) { + // set current state + WindowImpl.this.undecorated = undecorated; + + if( !fullscreen && isNativeValid() ) { + // Change decoration on active window + + // Mirror pos/size so native change notification can get overwritten int x = WindowImpl.this.x; int y = WindowImpl.this.y; int width = WindowImpl.this.width; @@ -1202,6 +1207,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer display.dispatchMessagesNative(); // status up2date } } + } } } finally { windowLock.unlock(); diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java b/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java index 1a86b891d..e05c6d63a 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java @@ -121,7 +121,7 @@ public class AWTWindow extends WindowImpl { new AWTWindowAdapter(this).addTo(container); // fwd all AWT Window events to here if(null!=frame) { - frame.setUndecorated(undecorated||fullscreen); + frame.setUndecorated(isUndecorated()); } setWindowHandle(1); // just a marker .. diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java index 75b4e7d90..029819913 100644 --- a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java +++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java @@ -105,7 +105,7 @@ public class WindowsWindow extends WindowImpl { throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this); } setWindowHandle(CreateWindow0(display.getHInstance(), display.getWindowClassName(), display.getWindowClassName(), - getParentWindowHandle(), 0, undecorated, x, y, width, height)); + getParentWindowHandle(), 0, isUndecorated(), x, y, width, height)); if (getWindowHandle() == 0) { throw new NativeWindowException("Error creating window"); } |