util  Diff

Differences From Artifact [54b90bee6d]:

  • File safekill.c — part of check-in [12c34052e4] at 2019-04-12 00:49:13 on branch trunk — make safekill use _NET_CLOSE_WINDOW extension where available instead of XDestroyWindow, which is super unfriendly and frequently crashes or hard-locks multi-window applications. XDestroyWindow is still available as a fallback if the extension fails; `export k_safekill_fallback=0` to stop this (user: lexi, size: 4139) [annotate] [blame] [check-ins using]

To Artifact [95fcf40cb0]:


     1      1   /* [ʞ] safekill.c <c.hale.su/lexi/util>
     2      2    *  ~ lexi hale <lexi@hale.su>
     3      3    *  $ cc -Ofast safekill.c -lX11 -lc -osafekill
     4      4    *  © affero general public license
            5  + 
     5      6    * a utility to make it harder to accidentally nuke
     6      7    * important windows on i3wm or whatever. */
     7      8   
     8      9   #include <X11/Xlib.h>
     9     10   #include <X11/Xutil.h>
    10     11   #include <X11/Xatom.h>
    11     12   #include <stdio.h>