diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-06-26 20:08:03 +0300 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-06-28 19:27:53 +0300 |
| commit | 74996c097b03a57b19f03e55cc0920be7c5e3f87 (patch) | |
| tree | 2dc1c842f6c39d8f0c5e3122d49708c2d05b6737 /monsterwm.c | |
| parent | 5623ca6b5a7e633c37c08dbef70390b4e57a0fcc (diff) | |
rework mousemotion function return conditional
Diffstat (limited to 'monsterwm.c')
| -rw-r--r-- | monsterwm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/monsterwm.c b/monsterwm.c index 7214100..02e1812 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -539,9 +539,8 @@ void maprequest(XEvent *e) { * Ungrab the poitner and event handling is passed back to run() function. * Once a window has been moved or resized, it's marked as floating. */ void mousemotion(const Arg *arg) { - if (!curr) return; static XWindowAttributes wa; - if (!XGetWindowAttributes(dis, curr->win, &wa)) return; + if (!curr || !XGetWindowAttributes(dis, curr->win, &wa)) return; if (XGrabPointer(dis, root, False, BUTTONMASK|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime) != GrabSuccess) return; |
