about summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2013-05-27 23:20:45 +0000
committerokan <okan>2013-05-27 23:20:45 +0000
commit692d341dfc6b059db570356e9dfadba92dc93f19 (patch)
treeaf826a805d5063176836a2531690c241d4ba862e
parentbe1a7a3f5c7c0777ba86d40c49425e97fbae62a1 (diff)
downloadcwm-692d341dfc6b059db570356e9dfadba92dc93f19.tar.gz
cwm-692d341dfc6b059db570356e9dfadba92dc93f19.tar.xz
cwm-692d341dfc6b059db570356e9dfadba92dc93f19.zip
fix type in a ClientMessage (xu_sendmsg).
-rw-r--r--calmwm.h2
-rw-r--r--xutil.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/calmwm.h b/calmwm.h
index 25eae87..62f574a 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -457,7 +457,7 @@ int			 xu_ptr_grab(Window, u_int, Cursor);
 int			 xu_ptr_regrab(u_int, Cursor);
 void			 xu_ptr_setpos(Window, int, int);
 void			 xu_ptr_ungrab(void);
-void			 xu_sendmsg(Window, Atom, long);
+void			 xu_sendmsg(Window, Atom, Atom);
 void			 xu_set_wm_state(Window win, int);
 void			 xu_xft_draw(struct screen_ctx *, const char *,
 			     int, int, int);
diff --git a/xutil.c b/xutil.c
index 37d7e24..56325b6 100644
--- a/xutil.c
+++ b/xutil.c
@@ -125,19 +125,19 @@ xu_configure(struct client_ctx *cc)
 }
 
 void
-xu_sendmsg(Window win, Atom atm, long val)
+xu_sendmsg(Window win, Atom type, Atom atm)
 {
-	XEvent	 e;
+	XClientMessageEvent	 e;
 
-	(void)memset(&e, 0, sizeof(e));
-	e.xclient.type = ClientMessage;
-	e.xclient.window = win;
-	e.xclient.message_type = atm;
-	e.xclient.format = 32;
-	e.xclient.data.l[0] = val;
-	e.xclient.data.l[1] = CurrentTime;
+	bzero(&e, sizeof(e));
+	e.type = ClientMessage;
+	e.window = win;
+	e.message_type = type;
+	e.format = 32;
+	e.data.l[0] = atm;
+	e.data.l[1] = CurrentTime;
 
-	XSendEvent(X_Dpy, win, False, 0, &e);
+	XSendEvent(X_Dpy, win, False, 0L, (XEvent *)&e);
 }
 
 int