changeset: 848:944739ec944a
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Mon Feb 26 16:24:51 2007 +0100
summary: removed sendevent
diff -r b386350fa4ec -r 944739ec944a client.c
--- a/client.c Mon Feb 26 10:47:11 2007 +0100
+++ b/client.c Mon Feb 26 16:24:51 2007 +0100
@@ -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 -r b386350fa4ec -r 944739ec944a dwm.h
--- a/dwm.h Mon Feb 26 10:47:11 2007 +0100
+++ b/dwm.h Mon Feb 26 16:24:51 2007 +0100
@@ -130,7 +130,6 @@ void zoom(const char *arg); /* zooms th
/* 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 -r b386350fa4ec -r 944739ec944a main.c
--- a/main.c Mon Feb 26 10:47:11 2007 +0100
+++ b/main.c Mon Feb 26 16:24:51 2007 +0100
@@ -222,20 +222,6 @@ xerrorstart(Display *dsply, XErrorEvent
/* 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;
}
Received on Mon Feb 26 2007 - 16:27:05 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:58 UTC