Improve code of func "configure"
This commit is contained in:
parent
6e9cacd221
commit
ccf2b24de8
29
src/dwm.c
29
src/dwm.c
|
@ -477,20 +477,23 @@ void cleanupmon(Monitor *mon)
|
||||||
|
|
||||||
void configure(Client *c)
|
void configure(Client *c)
|
||||||
{
|
{
|
||||||
XConfigureEvent ce;
|
XConfigureEvent ce = {
|
||||||
|
.type = ConfigureNotify,
|
||||||
|
.serial = 0,
|
||||||
|
.send_event = False,
|
||||||
|
.display = dpy,
|
||||||
|
.event = c->win,
|
||||||
|
.window = c->win,
|
||||||
|
.x = c->x,
|
||||||
|
.y = c->y,
|
||||||
|
.width = c->w,
|
||||||
|
.height = c->h,
|
||||||
|
.border_width = c->bw,
|
||||||
|
.above = None,
|
||||||
|
.override_redirect = False,
|
||||||
|
};
|
||||||
|
|
||||||
ce.type = ConfigureNotify;
|
XSendEvent(dpy, c->win, False, StructureNotifyMask, (XEvent*)&ce);
|
||||||
ce.display = dpy;
|
|
||||||
ce.event = c->win;
|
|
||||||
ce.window = c->win;
|
|
||||||
ce.x = c->x;
|
|
||||||
ce.y = c->y;
|
|
||||||
ce.width = c->w;
|
|
||||||
ce.height = c->h;
|
|
||||||
ce.border_width = c->bw;
|
|
||||||
ce.above = None;
|
|
||||||
ce.override_redirect = False;
|
|
||||||
XSendEvent(dpy, c->win, False, StructureNotifyMask, (XEvent *)&ce);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Monitor *createmon()
|
Monitor *createmon()
|
||||||
|
|
Loading…
Reference in New Issue