killunsel.c (597B)
1 void 2 killunsel(const Arg *arg) 3 { 4 Client *i = NULL; 5 6 if (!selmon->sel) 7 return; 8 9 for (i = selmon->clients; i; i = i->next) { 10 if (ISVISIBLE(i) && i != selmon->sel) { 11 #if BAR_SYSTRAY_PATCH 12 if (!sendevent(i->win, wmatom[WMDelete], NoEventMask, wmatom[WMDelete], CurrentTime, 0, 0, 0)) 13 #else 14 if (!sendevent(i, wmatom[WMDelete])) 15 #endif // BAR_SYSTRAY_PATCH 16 { 17 XGrabServer(dpy); 18 XSetErrorHandler(xerrordummy); 19 XSetCloseDownMode(dpy, DestroyAll); 20 XKillClient(dpy, i->win); 21 XSync(dpy, False); 22 XSetErrorHandler(xerror); 23 XUngrabServer(dpy); 24 } 25 } 26 } 27 } 28