simplify window_configure() args
This commit is contained in:
parent
4d756f84c3
commit
7983a3196d
6
client.c
6
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);
|
||||
|
|
9
event.c
9
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
|
||||
{
|
||||
|
|
10
window.c
10
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;
|
||||
|
|
2
window.h
2
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);
|
||||
|
|
Loading…
Reference in New Issue