diff options
author | Sven Gothel <[email protected]> | 2011-12-24 04:15:52 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-24 04:15:52 +0100 |
commit | f0159e479d386e5ae7d1e5acfb44eb7a534cb24c (patch) | |
tree | 19bbcc7944becb8843cafe854afce78d28311231 /src/newt/native/X11Window.c | |
parent | 976e47291d052caab4b101d900270a073a3bbb55 (diff) |
NEWT Windows/X11: Remove missed negative coordinate restrictions.
Diffstat (limited to 'src/newt/native/X11Window.c')
-rw-r--r-- | src/newt/native/X11Window.c | 10 |
1 files changed, 4 insertions, 6 deletions
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; |