2019-10-05 20:55:46 +00:00
|
|
|
void
|
|
|
|
killunsel(const Arg *arg)
|
|
|
|
{
|
|
|
|
Client *i = NULL;
|
|
|
|
|
|
|
|
if (!selmon->sel)
|
|
|
|
return;
|
|
|
|
|
|
|
|
for (i = selmon->clients; i; i = i->next) {
|
|
|
|
if (ISVISIBLE(i) && i != selmon->sel) {
|
2020-07-15 06:57:30 +00:00
|
|
|
#if BAR_SYSTRAY_PATCH
|
2019-10-06 21:43:51 +00:00
|
|
|
if (!sendevent(i->win, wmatom[WMDelete], NoEventMask, wmatom[WMDelete], CurrentTime, 0, 0, 0))
|
|
|
|
#else
|
|
|
|
if (!sendevent(i, wmatom[WMDelete]))
|
2020-07-15 06:57:30 +00:00
|
|
|
#endif // BAR_SYSTRAY_PATCH
|
2019-10-06 21:43:51 +00:00
|
|
|
{
|
2019-10-05 20:55:46 +00:00
|
|
|
XGrabServer(dpy);
|
|
|
|
XSetErrorHandler(xerrordummy);
|
|
|
|
XSetCloseDownMode(dpy, DestroyAll);
|
|
|
|
XKillClient(dpy, i->win);
|
|
|
|
XSync(dpy, False);
|
|
|
|
XSetErrorHandler(xerror);
|
|
|
|
XUngrabServer(dpy);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-06-14 05:16:17 +00:00
|
|
|
}
|
|
|
|
|