summary refs log tree commit diff
path: root/kbfunc.c
diff options
context:
space:
mode:
authorokan <okan>2009-01-16 15:24:14 +0000
committerokan <okan>2009-01-16 15:24:14 +0000
commitec8e6052ba902d2b6afced31008aad015d38f062 (patch)
tree68c77d7e466ced3867647a355e86bb4dc28a0a67 /kbfunc.c
parent5c757cc7f420f58112d3e2af7a6f124994bcbe23 (diff)
downloadcwm-ec8e6052ba902d2b6afced31008aad015d38f062.tar.gz
cwm-ec8e6052ba902d2b6afced31008aad015d38f062.tar.xz
cwm-ec8e6052ba902d2b6afced31008aad015d38f062.zip
remove pwin, bringing us to one client, one window. we no longer have
to push attributes around, so things get a lot simplier, while fixing a
few issues in the meantime; original suggestion by Edd Barrett many many
moons ago.

annoying window placement and race, found in c2k8 by todd, fix by oga!

lots of feedback from todd and oga - thanks!

"commit that bad boy" oga@
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kbfunc.c b/kbfunc.c
index c836f6f..ded95f3 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -90,7 +90,7 @@ kbfunc_moveresize(struct client_ctx *cc, void *arg)
 			cc->geom.x = cc->sc->xmax;
 
 		client_move(cc);
-		xu_ptr_getpos(cc->pwin, &x, &y);
+		xu_ptr_getpos(cc->win, &x, &y);
 		cc->ptr.y = y + my;
 		cc->ptr.x = x + mx;
 		client_ptrwarp(cc);
@@ -103,7 +103,7 @@ kbfunc_moveresize(struct client_ctx *cc, void *arg)
 		client_resize(cc);
 
 		/* Make sure the pointer stays within the window. */
-		xu_ptr_getpos(cc->pwin, &cc->ptr.x, &cc->ptr.y);
+		xu_ptr_getpos(cc->win, &cc->ptr.x, &cc->ptr.y);
 		if (cc->ptr.x > cc->geom.width)
 			cc->ptr.x = cc->geom.width - cc->bwidth;
 		if (cc->ptr.y > cc->geom.height)
@@ -112,8 +112,8 @@ kbfunc_moveresize(struct client_ctx *cc, void *arg)
 		break;
 	case CWM_PTRMOVE:
 		if (cc) {
-			xu_ptr_getpos(cc->pwin, &x, &y);
-			xu_ptr_setpos(cc->pwin, x + mx, y + my);
+			xu_ptr_getpos(cc->win, &x, &y);
+			xu_ptr_setpos(cc->win, x + mx, y + my);
 		} else {
 			xu_ptr_getpos(sc->rootwin, &x, &y);
 			xu_ptr_setpos(sc->rootwin, x + mx, y + my);
@@ -455,7 +455,7 @@ void
 kbfunc_client_grouptoggle(struct client_ctx *cc, void *arg)
 {
 	/* XXX for stupid X apps like xpdf and gvim */
-	XGrabKeyboard(X_Dpy, cc->pwin, True,
+	XGrabKeyboard(X_Dpy, cc->win, True,
 	    GrabModeAsync, GrabModeAsync, CurrentTime);
 
 	group_sticky_toggle_enter(cc);