summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-09-16 07:25:41 +0200
committerSven Gothel <[email protected]>2011-09-16 07:25:41 +0200
commit3b402dad37065c17e657aa276b838739755ef477 (patch)
tree9030bab78080a9244feabd9b5b166f936a15fe40
parent4217453ef443519bbfdb9f18571d7143a3aabeae (diff)
NEWT/Reparent: Make new local position/size persitent if not promoted natively (invisible or recreation)
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 16bd221df..48eb9e0ce 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -1086,6 +1086,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
if( ACTION_NATIVE_CREATION_PENDING == reparentAction ) {
+ // make size and position persistent for proper recreation
+ WindowImpl.this.x = x;
+ WindowImpl.this.y = y;
+ WindowImpl.this.width = width;
+ WindowImpl.this.height = height;
return;
}
@@ -1140,6 +1145,15 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
}
+ if(!ok || !wasVisible) {
+ // make size and position persistent manual,
+ // since we don't have a WM feedback (invisible or recreation)
+ WindowImpl.this.x = x;
+ WindowImpl.this.y = y;
+ WindowImpl.this.width = width;
+ WindowImpl.this.height = height;
+ }
+
if(!ok) {
// native reparent failed -> try creation
if(DEBUG_IMPLEMENTATION) {