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);
|
XConfigureWindow(globalconf.display, w, CWBorderWidth, &wc);
|
||||||
XSetWindowBorder(globalconf.display, w, globalconf.screens[screen].colors_normal[ColBorder].pixel);
|
XSetWindowBorder(globalconf.display, w, globalconf.screens[screen].colors_normal[ColBorder].pixel);
|
||||||
/* propagates border_width, if size doesn't change */
|
/* propagates border_width, if size doesn't change */
|
||||||
window_configure(c->win, c->geometry.x, c->geometry.y,
|
window_configure(c->win, c->geometry, c->border);
|
||||||
c->geometry.width, c->geometry.height, c->border);
|
|
||||||
|
|
||||||
/* update hints */
|
/* update hints */
|
||||||
client_updatesizehints(c);
|
client_updatesizehints(c);
|
||||||
|
@ -517,8 +516,7 @@ client_resize(Client *c, Area geometry, Bool sizehints, Bool volatile_coords)
|
||||||
p_delete(&curtags);
|
p_delete(&curtags);
|
||||||
XMoveResizeWindow(globalconf.display, c->win, geometry.x, geometry.y,
|
XMoveResizeWindow(globalconf.display, c->win, geometry.x, geometry.y,
|
||||||
geometry.width, geometry.height);
|
geometry.width, geometry.height);
|
||||||
window_configure(c->win, geometry.x, geometry.y,
|
window_configure(c->win, geometry, c->border);
|
||||||
geometry.width, geometry.height, c->border);
|
|
||||||
if(XineramaIsActive(globalconf.display))
|
if(XineramaIsActive(globalconf.display))
|
||||||
{
|
{
|
||||||
int new_screen = get_screen_bycoord(geometry.x, geometry.y);
|
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)
|
if(ev->value_mask & CWHeight)
|
||||||
c->f_geometry.height = c->geometry.height = ev->height;
|
c->f_geometry.height = c->geometry.height = ev->height;
|
||||||
if((ev->value_mask & (CWX | CWY)) && !(ev->value_mask & (CWWidth | CWHeight)))
|
if((ev->value_mask & (CWX | CWY)) && !(ev->value_mask & (CWWidth | CWHeight)))
|
||||||
window_configure(c->win, c->geometry.x, c->geometry.y,
|
window_configure(c->win, c->geometry, c->border);
|
||||||
c->geometry.width, c->geometry.height, c->border);
|
|
||||||
/* recompute screen */
|
/* recompute screen */
|
||||||
old_screen = c->screen;
|
old_screen = c->screen;
|
||||||
c->screen = get_screen_bycoord(c->geometry.x, c->geometry.y);
|
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);
|
tag_client_with_rules(c);
|
||||||
XMoveResizeWindow(e->xany.display, c->win, c->f_geometry.x, c->f_geometry.y,
|
XMoveResizeWindow(e->xany.display, c->win, c->f_geometry.x, c->f_geometry.y,
|
||||||
c->f_geometry.width, c->f_geometry.height);
|
c->f_geometry.width, c->f_geometry.height);
|
||||||
window_configure(c->win, c->f_geometry.x, c->f_geometry.y,
|
window_configure(c->win, c->f_geometry, c->border);
|
||||||
c->f_geometry.width, c->f_geometry.height, c->border);
|
|
||||||
arrange(c->screen);
|
arrange(c->screen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window_configure(c->win, c->geometry.x, c->geometry.y,
|
window_configure(c->win, c->geometry, c->border);
|
||||||
c->geometry.width, c->geometry.height, c->border);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
10
window.c
10
window.c
|
@ -65,7 +65,7 @@ window_getstate(Window w)
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
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;
|
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.display = globalconf.display;
|
||||||
ce.event = win;
|
ce.event = win;
|
||||||
ce.window = win;
|
ce.window = win;
|
||||||
ce.x = x;
|
ce.x = geometry.x;
|
||||||
ce.y = y;
|
ce.y = geometry.y;
|
||||||
ce.width = w;
|
ce.width = geometry.width;
|
||||||
ce.height = h;
|
ce.height = geometry.height;
|
||||||
ce.border_width = border;
|
ce.border_width = border;
|
||||||
ce.above = None;
|
ce.above = None;
|
||||||
ce.override_redirect = False;
|
ce.override_redirect = False;
|
||||||
|
|
2
window.h
2
window.h
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
int window_setstate(Window, long);
|
int window_setstate(Window, long);
|
||||||
long window_getstate(Window);
|
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_grabbuttons(int, Window, Bool, Bool);
|
||||||
void window_setshape(int, Window);
|
void window_setshape(int, Window);
|
||||||
void window_settrans(Window, double);
|
void window_settrans(Window, double);
|
||||||
|
|
Loading…
Reference in New Issue