JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
added protocol killing stuff
[dwm.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index 8244540..9ac4e72 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -18,3 +18,17 @@ quit(char *arg)
        fputs("quit\n", stderr);
        running = False;
 }
+
+void
+kill(char *arg)
+{
+       Client *c = stack;
+
+       if(!c)
+               return;
+       if(c->proto & WM_PROTOCOL_DELWIN)
+               send_message(c->win, wm_atom[WMProtocols], wm_atom[WMDelete]);
+       else
+               XKillClient(dpy, c->win);
+}
+