about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-26 16:24:51 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-26 16:24:51 +0100
commitbab5b1178dd0a6bfe08e3d658a47b3b5671a93d4 (patch)
tree839a6a7e9029d8b00b899a1821341bff15cf7a1c
parentee8fb0c6e49780441a91f994595f4de0422df1a8 (diff)
downloaddwm-bab5b1178dd0a6bfe08e3d658a47b3b5671a93d4.tar.gz
removed sendevent
-rw-r--r--client.c13
-rw-r--r--dwm.h1
-rw-r--r--main.c14
3 files changed, 11 insertions, 17 deletions
diff --git a/client.c b/client.c
index d180278..e599203 100644
--- a/client.c
+++ b/client.c
@@ -154,10 +154,19 @@ focus(Client *c) {
 
 void
 killclient(const char *arg) {
+	XEvent ev;
+
 	if(!sel)
 		return;
-	if(isprotodel(sel))
-		sendevent(sel->win, wmatom[WMProtocols], wmatom[WMDelete]);
+	if(isprotodel(sel)) {
+		ev.type = ClientMessage;
+		ev.xclient.window = sel->win;
+		ev.xclient.message_type = wmatom[WMProtocols];
+		ev.xclient.format = 32;
+		ev.xclient.data.l[0] = wmatom[WMDelete];
+		ev.xclient.data.l[1] = CurrentTime;
+		XSendEvent(dpy, sel->win, False, NoEventMask, &ev);
+	}
 	else
 		XKillClient(dpy, sel->win);
 }
diff --git a/dwm.h b/dwm.h
index c00f691..0a259f8 100644
--- a/dwm.h
+++ b/dwm.h
@@ -130,7 +130,6 @@ void zoom(const char *arg);		/* zooms the focused client to master area, arg is
 
 /* main.c */
 void quit(const char *arg);		/* quit dwm nicely */
-void sendevent(Window w, Atom a, long value);	/* send synthetic event to w */
 int xerror(Display *dsply, XErrorEvent *ee);	/* dwm's X error handler */
 
 /* tag.c */
diff --git a/main.c b/main.c
index e6ba20c..8b67408 100644
--- a/main.c
+++ b/main.c
@@ -222,20 +222,6 @@ xerrorstart(Display *dsply, XErrorEvent *ee) {
 /* extern */
 
 void
-sendevent(Window w, Atom a, long value) {
-	XEvent e;
-
-	e.type = ClientMessage;
-	e.xclient.window = w;
-	e.xclient.message_type = a;
-	e.xclient.format = 32;
-	e.xclient.data.l[0] = value;
-	e.xclient.data.l[1] = CurrentTime;
-	XSendEvent(dpy, w, False, NoEventMask, &e);
-	XSync(dpy, False);
-}
-
-void
 quit(const char *arg) {
 	readin = running = False;
 }
adaa28a ^


849e631 ^
adaa28a ^

d4b7a9a ^




6a3ae5e ^
d4b7a9a ^


adaa28a ^
c47da14 ^
439e15d ^
9955ddc ^
dc5d967 ^
9955ddc ^



439e15d ^




16c67f3 ^
7711ab6 ^
e48de30 ^
439e15d ^

0464e42 ^
439e15d ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66