about summary refs log tree commit diff
path: root/kbfunc.c
diff options
context:
space:
mode:
authorokan <okan>2011-08-29 09:09:45 +0000
committerokan <okan>2011-08-29 09:09:45 +0000
commit0dcf7efb8eef706b36af4197514671e524482b43 (patch)
tree103628d363dcca05912ffcb7b85bf0efea3eab33 /kbfunc.c
parentbe3b8a0748f7470ed4a6e8bc51fe7622c93c6707 (diff)
downloadcwm-0dcf7efb8eef706b36af4197514671e524482b43.tar.gz
cwm-0dcf7efb8eef706b36af4197514671e524482b43.tar.xz
cwm-0dcf7efb8eef706b36af4197514671e524482b43.zip
restore mouse move via the keyboard, noticed by todd@. while the check
for cc was wrong due to the fact that cc->sc is always filled in during
the event, we don't even need it - just operate on the focused screen's
root window regardless.

ok todd@ oga@
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/kbfunc.c b/kbfunc.c
index 69b8d5e..fbb603d 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -129,13 +129,8 @@ kbfunc_moveresize(struct client_ctx *cc, union arg *arg)
 		client_ptrwarp(cc);
 		break;
 	case CWM_PTRMOVE:
-		if (cc) {
-			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);
-		}
+		xu_ptr_getpos(sc->rootwin, &x, &y);
+		xu_ptr_setpos(sc->rootwin, x + mx, y + my);
 		break;
 	default:
 		warnx("invalid flags passed to kbfunc_client_moveresize");