summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-09-02 16:43:46 +0200
committerSven Gothel <[email protected]>2011-09-02 16:43:46 +0200
commit002da0e057795c2f0679119c70f27ca914d9283b (patch)
tree80cfc0cfb31f32d78c2200a9f86292ae70b7369b /src/newt/classes
parenteda2da8a1a01d59edd8e74fa0387bb3dee3eb681 (diff)
NEWT: Respect 'setUndecorated(true)' before native creation (ie. startup w/ undecorated window)
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java12
-rw-r--r--src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java2
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");
}