aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native/X11Window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/native/X11Window.c')
-rw-r--r--src/newt/native/X11Window.c10
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;