Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
595 B

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