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