Improve code of func "configure"

This commit is contained in:
Alex Kotov 2021-11-20 21:56:33 +05:00
parent 6e9cacd221
commit ccf2b24de8
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 16 additions and 13 deletions

View File

@ -477,20 +477,23 @@ void cleanupmon(Monitor *mon)
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;
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);
XSendEvent(dpy, c->win, False, StructureNotifyMask, (XEvent*)&ce);
}
Monitor *createmon()