From 806eaefbddc237cd544a9f1aa3715f3c429e08ae Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 27 May 2013 23:20:45 +0000 Subject: fix type in a ClientMessage (xu_sendmsg). --- calmwm.h | 4 ++-- xutil.c | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/calmwm.h b/calmwm.h index a2f1e97..4dbaf67 100644 --- a/calmwm.h +++ b/calmwm.h @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: calmwm.h,v 1.210 2013/05/23 16:52:39 okan Exp $ + * $OpenBSD: calmwm.h,v 1.211 2013/05/27 23:20:45 okan Exp $ */ #ifndef _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 b610659..719afa8 100644 --- a/xutil.c +++ b/xutil.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: xutil.c,v 1.67 2013/05/23 16:52:39 okan Exp $ + * $OpenBSD: xutil.c,v 1.68 2013/05/27 23:20:45 okan Exp $ */ #include @@ -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 -- cgit v1.2.3-2-gb3c3