Adding killunsel patch
This commit is contained in:
@ -52,6 +52,10 @@
|
||||
#include "holdbar.c"
|
||||
#endif
|
||||
|
||||
#if KILLUNSEL_PATCH
|
||||
#include "killunsel.c"
|
||||
#endif
|
||||
|
||||
#if MAXIMIZE_PATCH
|
||||
#include "maximize.c"
|
||||
#endif
|
||||
|
@ -52,6 +52,10 @@
|
||||
#include "holdbar.h"
|
||||
#endif
|
||||
|
||||
#if KILLUNSEL_PATCH
|
||||
#include "killunsel.h"
|
||||
#endif
|
||||
|
||||
#if MAXIMIZE_PATCH
|
||||
#include "maximize.h"
|
||||
#endif
|
||||
|
22
patch/killunsel.c
Normal file
22
patch/killunsel.c
Normal file
@ -0,0 +1,22 @@
|
||||
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) {
|
||||
if (!sendevent(i, wmatom[WMDelete])) {
|
||||
XGrabServer(dpy);
|
||||
XSetErrorHandler(xerrordummy);
|
||||
XSetCloseDownMode(dpy, DestroyAll);
|
||||
XKillClient(dpy, i->win);
|
||||
XSync(dpy, False);
|
||||
XSetErrorHandler(xerror);
|
||||
XUngrabServer(dpy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
patch/killunsel.h
Normal file
1
patch/killunsel.h
Normal file
@ -0,0 +1 @@
|
||||
static void killunsel(const Arg *arg);
|
Reference in New Issue
Block a user