aewl
annotate cmd.c @ 13:5cc5e55a132d
added protocol killing stuff
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Tue, 11 Jul 2006 16:14:22 +0200 |
parents | a2b399582afe |
children | 5c078b66347b |
rev | line source |
---|---|
garbeam@12 | 1 /* |
garbeam@12 | 2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
garbeam@12 | 3 * See LICENSE file for license details. |
garbeam@12 | 4 */ |
garbeam@12 | 5 |
garbeam@12 | 6 #include "wm.h" |
garbeam@12 | 7 #include <stdio.h> |
garbeam@12 | 8 |
garbeam@12 | 9 void |
garbeam@12 | 10 run(char *arg) |
garbeam@12 | 11 { |
garbeam@12 | 12 spawn(dpy, arg); |
garbeam@12 | 13 } |
garbeam@12 | 14 |
garbeam@12 | 15 void |
garbeam@12 | 16 quit(char *arg) |
garbeam@12 | 17 { |
garbeam@12 | 18 fputs("quit\n", stderr); |
garbeam@12 | 19 running = False; |
garbeam@12 | 20 } |
garbeam@13 | 21 |
garbeam@13 | 22 void |
garbeam@13 | 23 kill(char *arg) |
garbeam@13 | 24 { |
garbeam@13 | 25 Client *c = stack; |
garbeam@13 | 26 |
garbeam@13 | 27 if(!c) |
garbeam@13 | 28 return; |
garbeam@13 | 29 if(c->proto & WM_PROTOCOL_DELWIN) |
garbeam@13 | 30 send_message(c->win, wm_atom[WMProtocols], wm_atom[WMDelete]); |
garbeam@13 | 31 else |
garbeam@13 | 32 XKillClient(dpy, c->win); |
garbeam@13 | 33 } |
garbeam@13 | 34 |