mirror of
https://github.com/dylanaraps/sowm.git
synced 2025-05-19 01:20:23 -07:00
sowm: simpler kill
This commit is contained in:
parent
e491a637fe
commit
3ed647f467
10
sowm.c
10
sowm.c
@ -122,7 +122,15 @@ void win_del(Window w) {
|
||||
}
|
||||
|
||||
void win_kill(const Arg arg) {
|
||||
if (cur) XKillClient(d, cur->w);
|
||||
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
|
||||
});
|
||||
}
|
||||
|
||||
void win_center(const Arg arg) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user