summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--calmwm.h2
-rw-r--r--client.c2
-rw-r--r--xutil.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/calmwm.h b/calmwm.h
index 86650ca..6f39aeb 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -466,7 +466,7 @@ void			 xu_configure(struct client_ctx *);
 void			 xu_getatoms(void);
 unsigned long		 xu_getcolor(struct screen_ctx *, char *);
 int			 xu_getprop(Window, Atom, Atom, long, u_char **);
-int			 xu_getstate(struct client_ctx *, int *);
+int			 xu_getstate(Window, int *);
 int			 xu_getstrprop(Window, Atom, char **);
 void			 xu_key_grab(Window, int, int);
 void			 xu_key_ungrab(Window, int, int);
diff --git a/client.c b/client.c
index 495625f..932b4bc 100644
--- a/client.c
+++ b/client.c
@@ -111,7 +111,7 @@ client_new(Window win, struct screen_ctx *sc, int mapped)
 	}
 	client_draw_border(cc);
 
-	if (xu_getstate(cc, &state) < 0)
+	if (xu_getstate(cc->win, &state) < 0)
 		state = NormalState;
 
 	XSelectInput(X_Dpy, cc->win, ColormapChangeMask | EnterWindowMask |
diff --git a/xutil.c b/xutil.c
index 3605e71..a663150 100644
--- a/xutil.c
+++ b/xutil.c
@@ -72,13 +72,13 @@ xu_btn_ungrab(Window win, int mask, u_int btn)
 }
 
 void
-xu_ptr_getpos(Window rootwin, int *x, int *y)
+xu_ptr_getpos(Window win, int *x, int *y)
 {
 	Window	 w0, w1;
 	int	 tmp0, tmp1;
 	u_int	 tmp2;
 
-	XQueryPointer(X_Dpy, rootwin, &w0, &w1, &tmp0, &tmp1, x, y, &tmp2);
+	XQueryPointer(X_Dpy, win, &w0, &w1, &tmp0, &tmp1, x, y, &tmp2);
 }
 
 void
@@ -203,11 +203,11 @@ xu_getstrprop(Window win, Atom atm, char **text) {
 }
 
 int
-xu_getstate(struct client_ctx *cc, int *state)
+xu_getstate(Window win, int *state)
 {
 	long	*p = NULL;
 
-	if (xu_getprop(cc->win, cwmh[WM_STATE].atom, cwmh[WM_STATE].atom, 2L,
+	if (xu_getprop(win, cwmh[WM_STATE].atom, cwmh[WM_STATE].atom, 2L,
 	    (u_char **)&p) <= 0)
 		return (-1);