summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-05-16 17:35:10 -0400
committerKristian Høgsberg <krh@bitplanet.net>2013-05-16 17:35:10 -0400
commitb3cd14fd1be0e8c665ed6c207f2bb9c347ea7a83 (patch)
treea723aa99a6fd2f0c1779c09526cdcfe55d1fed6c
parent660127c22a03bbe960cf6274b3c8bf244f96a4ae (diff)
Fill out configurewindow variants
-rw-r--r--src/window.c39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c
index 71203d8..af7f024 100644
--- a/src/window.c
+++ b/src/window.c
@@ -287,6 +287,17 @@ XConfigureWindow(Display *xdisplay, Window xwindow,
csx_display_bad_window(display);
return 0; /* what's the return value? */
}
+
+ if (mask & CWX)
+ window->x = values->x;
+ if (mask & CWY)
+ window->y = values->y;
+ if (mask & CWWidth)
+ window->width = values->width;
+ if (mask & CWHeight)
+ window->height = values->height;
+
+ /* Send out events as necessary: exposures, configure notify etc */
}
WL_EXPORT int
@@ -314,20 +325,42 @@ XReparentWindow(Display *xdisplay, Window xwindow,
}
WL_EXPORT int
-XResizeWindow(Display *display, Window xwindow,
+XResizeWindow(Display *xdisplay, Window xwindow,
unsigned int width, unsigned int height)
{
+ XWindowChanges values;
+
+ values.width = width;
+ values.height = height;
+
+ return XConfigureWindow(xdisplay, xwindow,
+ CWWidth | CWHeight, &values);
}
WL_EXPORT int
-XMoveResizeWindow(Display *display, Window xwindow,
+XMoveResizeWindow(Display *xdisplay, Window xwindow,
int x, int y, unsigned int width, unsigned int height)
{
+ XWindowChanges values;
+
+ values.x = x;
+ values.y = y;
+ values.width = width;
+ values.height = height;
+
+ return XConfigureWindow(xdisplay, xwindow,
+ CWX | CWY | CWWidth | CWHeight, &values);
}
WL_EXPORT int
-XMoveWindow(Display *display, Window xwindow, int x, int y)
+XMoveWindow(Display *xdisplay, Window xwindow, int x, int y)
{
+ XWindowChanges values;
+
+ values.x = x;
+ values.y = y;
+
+ return XConfigureWindow(xdisplay, xwindow, CWX | CWY, &values);
}
WL_EXPORT int