From ed4f0c20fe85347fb390ed43f86599aa547da588 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 27 Sep 2007 21:32:48 +0200 Subject: [PATCH] fix bug in mouseresize with Xinerama --- event.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/event.c b/event.c index 6fa37433..8a5fadf5 100644 --- a/event.c +++ b/event.c @@ -108,13 +108,17 @@ movemouse(Client * c, awesome_config *awesomeconf) static void resizemouse(Client * c, awesome_config *awesomeconf) { - int ocx, ocy; - int nw, nh; + int ocx, ocy, nw, nh, real_screen; XEvent ev; + if(XineramaIsActive(c->display)) + real_screen = DefaultScreen(c->display); + else + real_screen = awesomeconf->screen; + ocx = c->x; ocy = c->y; - if(XGrabPointer(c->display, RootWindow(c->display, c->screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync, + if(XGrabPointer(c->display, RootWindow(c->display, real_screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync, None, dc[c->screen].cursor[CurResize], CurrentTime) != GrabSuccess) return; c->ismax = False;