diff --git a/client.c b/client.c index f0be5464e..c0bafee57 100644 --- a/client.c +++ b/client.c @@ -367,8 +367,7 @@ client_manage(Window w, XWindowAttributes *wa, int screen) XConfigureWindow(globalconf.display, w, CWBorderWidth, &wc); XSetWindowBorder(globalconf.display, w, globalconf.screens[screen].colors_normal[ColBorder].pixel); /* propagates border_width, if size doesn't change */ - window_configure(c->win, c->geometry.x, c->geometry.y, - c->geometry.width, c->geometry.height, c->border); + window_configure(c->win, c->geometry, c->border); /* update hints */ client_updatesizehints(c); @@ -517,8 +516,7 @@ client_resize(Client *c, Area geometry, Bool sizehints, Bool volatile_coords) p_delete(&curtags); XMoveResizeWindow(globalconf.display, c->win, geometry.x, geometry.y, geometry.width, geometry.height); - window_configure(c->win, geometry.x, geometry.y, - geometry.width, geometry.height, c->border); + window_configure(c->win, geometry, c->border); if(XineramaIsActive(globalconf.display)) { int new_screen = get_screen_bycoord(geometry.x, geometry.y); diff --git a/event.c b/event.c index 558ee820c..5361f6d06 100644 --- a/event.c +++ b/event.c @@ -154,8 +154,7 @@ handle_event_configurerequest(XEvent * e) if(ev->value_mask & CWHeight) c->f_geometry.height = c->geometry.height = ev->height; if((ev->value_mask & (CWX | CWY)) && !(ev->value_mask & (CWWidth | CWHeight))) - window_configure(c->win, c->geometry.x, c->geometry.y, - c->geometry.width, c->geometry.height, c->border); + window_configure(c->win, c->geometry, c->border); /* recompute screen */ old_screen = c->screen; c->screen = get_screen_bycoord(c->geometry.x, c->geometry.y); @@ -168,13 +167,11 @@ handle_event_configurerequest(XEvent * e) tag_client_with_rules(c); XMoveResizeWindow(e->xany.display, c->win, c->f_geometry.x, c->f_geometry.y, c->f_geometry.width, c->f_geometry.height); - window_configure(c->win, c->f_geometry.x, c->f_geometry.y, - c->f_geometry.width, c->f_geometry.height, c->border); + window_configure(c->win, c->f_geometry, c->border); arrange(c->screen); } else - window_configure(c->win, c->geometry.x, c->geometry.y, - c->geometry.width, c->geometry.height, c->border); + window_configure(c->win, c->geometry, c->border); } else { diff --git a/window.c b/window.c index 16b4322b7..054645477 100644 --- a/window.c +++ b/window.c @@ -65,7 +65,7 @@ window_getstate(Window w) } Status -window_configure(Window win, int x, int y, int w, int h, int border) +window_configure(Window win, Area geometry, int border) { XConfigureEvent ce; @@ -73,10 +73,10 @@ window_configure(Window win, int x, int y, int w, int h, int border) ce.display = globalconf.display; ce.event = win; ce.window = win; - ce.x = x; - ce.y = y; - ce.width = w; - ce.height = h; + ce.x = geometry.x; + ce.y = geometry.y; + ce.width = geometry.width; + ce.height = geometry.height; ce.border_width = border; ce.above = None; ce.override_redirect = False; diff --git a/window.h b/window.h index cfdcaa850..1c790283e 100644 --- a/window.h +++ b/window.h @@ -29,7 +29,7 @@ int window_setstate(Window, long); long window_getstate(Window); -Status window_configure(Window, int, int, int, int, int); +Status window_configure(Window, Area, int); void window_grabbuttons(int, Window, Bool, Bool); void window_setshape(int, Window); void window_settrans(Window, double);