summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-09-29 09:25:18 -0700
committerSven Gothel <[email protected]>2009-09-29 09:25:18 -0700
commitcd45d13bbd0ff1da3dac678a6461b5fdce2783c1 (patch)
tree860ff4de570e7e7930ea5ca514216fa4bd24c4d2 /src/newt/classes
parent079c94b7a0b64bc6a77abdfd4377262e75159478 (diff)
NEWT: Fix X11 ConfigureEvent ; X11Window don't propagate pos change if parented
Diffstat (limited to 'src/newt/classes')
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/x11/X11Window.java38
1 files changed, 25 insertions, 13 deletions
diff --git a/src/newt/classes/com/sun/javafx/newt/x11/X11Window.java b/src/newt/classes/com/sun/javafx/newt/x11/X11Window.java
index 57653a6d3..46e797c21 100755
--- a/src/newt/classes/com/sun/javafx/newt/x11/X11Window.java
+++ b/src/newt/classes/com/sun/javafx/newt/x11/X11Window.java
@@ -98,31 +98,37 @@ public class X11Window extends Window {
}
public void setSize(int width, int height) {
- if(0==windowHandle) return;
- if(!visible) {
- // set values, since no event roundtrip will happen to set them
- this.width = width;
- this.height = height;
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window setSize: "+this.x+"/"+this.y+" "+this.width+"x"+this.height+" -> "+width+"x"+height);
+ // Exception e = new Exception("XXXXXXXXXX");
+ // e.printStackTrace();
}
+ this.width = width;
+ this.height = height;
if(!fullscreen) {
nfs_width=width;
nfs_height=height;
}
- setSize0(parentWindowHandle, getDisplayHandle(), getScreenIndex(), windowHandle, x, y, width, height, (undecorated||fullscreen)?-1:1, false);
+ if(0!=windowHandle) {
+ setSize0(parentWindowHandle, getDisplayHandle(), getScreenIndex(), windowHandle, x, y, width, height, (undecorated||fullscreen)?-1:1, false);
+ }
}
public void setPosition(int x, int y) {
- if(0==windowHandle) return;
- if(!visible) {
- // set values, since no event roundtrip will happen to set them
- this.x = x;
- this.y = y;
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window setPosition: "+this.x+"/"+this.y+" -> "+x+"/"+y);
+ // Exception e = new Exception("XXXXXXXXXX");
+ // e.printStackTrace();
}
+ this.x = x;
+ this.y = y;
if(!fullscreen) {
nfs_x=x;
nfs_y=y;
}
- setPosition0(getDisplayHandle(), windowHandle, x, y);
+ if(0!=windowHandle) {
+ setPosition0(getDisplayHandle(), windowHandle, x, y);
+ }
}
public boolean setFullscreen(boolean fullscreen) {
@@ -162,6 +168,9 @@ public class X11Window extends Window {
private void windowChanged(int newX, int newY, int newWidth, int newHeight) {
if(width != newWidth || height != newHeight) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window windowChanged size: "+this.width+"x"+this.height+" -> "+newWidth+"x"+newHeight);
+ }
width = newWidth;
height = newHeight;
if(!fullscreen) {
@@ -170,7 +179,10 @@ public class X11Window extends Window {
}
sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
}
- if(x != newX || y != newY) {
+ if( 0==parentWindowHandle && ( x != newX || y != newY ) ) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window windowChanged position: "+this.x+"/"+this.y+" -> "+newX+"x"+newY);
+ }
x = newX;
y = newY;
if(!fullscreen) {