summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-12-24 04:15:52 +0100
committerSven Gothel <[email protected]>2011-12-24 04:15:52 +0100
commitf0159e479d386e5ae7d1e5acfb44eb7a534cb24c (patch)
tree19bbcc7944becb8843cafe854afce78d28311231 /src
parent976e47291d052caab4b101d900270a073a3bbb55 (diff)
NEWT Windows/X11: Remove missed negative coordinate restrictions.
Diffstat (limited to 'src')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java3
-rw-r--r--src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java8
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/X11Window.java4
-rw-r--r--src/newt/native/X11Window.c10
4 files changed, 9 insertions, 16 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index f667d7540..ceb368973 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -1677,7 +1677,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
nfs_y = WindowImpl.this.y;
nfs_width = WindowImpl.this.width;
nfs_height = WindowImpl.this.height;
- x = screen.getX(); y = screen.getY();
+ x = screen.getX();
+ y = screen.getY();
w = screen.getWidth();
h = screen.getHeight();
} else {
diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
index ca868f4ee..ff3bd5ef6 100644
--- a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
+++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
@@ -174,12 +174,8 @@ public class WindowsWindow extends WindowImpl {
final InsetsImmutable i = getInsets();
// client position -> top-level window position
- if(0<=x && 0<=y) {
- x -= i.getLeftWidth() ;
- y -= i.getTopHeight() ;
- if( 0 > x ) { x = 0; }
- if( 0 > y ) { y = 0; }
- }
+ x -= i.getLeftWidth() ;
+ y -= i.getTopHeight() ;
if(0<width && 0<height) {
// client size -> top-level window size
diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11Window.java b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
index 0bcf45a8d..33b541c34 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
@@ -108,14 +108,12 @@ public class X11Window extends WindowImpl {
System.err.println("X11Window reconfig: "+x+"/"+y+" "+width+"x"+height+", "+
getReconfigureFlagsAsString(null, flags));
}
- if(0 == ( FLAG_IS_UNDECORATED & flags) && 0<=x && 0<=y) {
+ if(0 == ( FLAG_IS_UNDECORATED & flags)) {
final InsetsImmutable i = getInsets();
// client position -> top-level window position
x -= i.getLeftWidth() ;
y -= i.getTopHeight() ;
- if( 0 > x ) { x = 0; }
- if( 0 > y ) { y = 0; }
}
reconfigureWindow0( getDisplayEDTHandle(), getScreenIndex(), getParentWindowHandle(), getWindowHandle(),
x, y, width, height, flags);
diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c
index 1c74b7b7c..0a7e1cf77 100644
--- a/src/newt/native/X11Window.c
+++ b/src/newt/native/X11Window.c
@@ -456,14 +456,12 @@ static Bool WaitForUnmapNotify( Display *dpy, XEvent *event, XPointer arg ) {
static void NewtWindows_setPosSize(Display *dpy, Window w, jint x, jint y, jint width, jint height) {
if(width>0 && height>0 || x>=0 && y>=0) { // resize/position if requested
XWindowChanges xwc;
- int flags = 0;
+ int flags = CWX | CWY;
memset(&xwc, 0, sizeof(XWindowChanges));
- if(0<=x && 0<=y) {
- flags |= CWX | CWY;
- xwc.x=x;
- xwc.y=y;
- }
+ xwc.x=x;
+ xwc.y=y;
+
if(0<width && 0<height) {
flags |= CWWidth | CWHeight;
xwc.width=width;