sowm: Fix normal kill

This commit is contained in:
Dylan Araps 2020-04-23 08:40:08 +03:00
parent 0ed080b99c
commit ea47780ab0
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 9 additions and 7 deletions

16
sowm.c
View File

@ -124,13 +124,15 @@ void win_del(Window w) {
void win_kill(const Arg arg) {
if (!cur) return;
XSendEvent(d, cur->w, False, NoEventMask, &(XEvent){
.type = ClientMessage,
.xclient.window = cur->w,
.xclient.message_type = XInternAtom(d, "WM_PROTOCOLS", True),
.xclient.data.l[0] = XInternAtom(d, "WM_DELETE_WINDOW", True),
.xclient.data.l[1] = CurrentTime
});
XEvent ev = { .type = ClientMessage };
ev.xclient.window = cur->w;
ev.xclient.format = 32;
ev.xclient.message_type = XInternAtom(d, "WM_PROTOCOLS", True);
ev.xclient.data.l[0] = XInternAtom(d, "WM_DELETE_WINDOW", True);
ev.xclient.data.l[1] = CurrentTime;
XSendEvent(d, cur->w, False, NoEventMask, &ev);
}
void win_center(const Arg arg) {