[Xfce4-commits] [xfce/xfwm4] 01/01: Allow cycling even without the pointer grab
noreply at xfce.org
noreply at xfce.org
Sat Jan 17 17:21:50 CET 2015
This is an automated email from the git hooks/post-receive script.
olivier pushed a commit to branch master
in repository xfce/xfwm4.
commit 24c8f337bb62e8573ac7a9220480a68e2d7b7775
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sat Jan 17 17:09:12 2015 +0100
Allow cycling even without the pointer grab
Bug: 11463
This allows cycling during a drag and drop.
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/cycle.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/cycle.c b/src/cycle.c
index 1f1dccc..1df14df 100644
--- a/src/cycle.c
+++ b/src/cycle.c
@@ -375,6 +375,8 @@ clientCycleEventFilter (XEvent * xevent, gpointer data)
c = c2;
}
break;
+ case ButtonRelease:
+ break;
case EnterNotify:
case LeaveNotify:
/* Track whether the pointer is inside one of the tab-windows */
@@ -492,8 +494,8 @@ clientCycle (Client * c, XKeyEvent * ev)
g1 = myScreenGrabKeyboard (screen_info, ev->time);
g2 = myScreenGrabPointer (screen_info, TRUE, LeaveWindowMask, None, ev->time);
-
- if (!g1 || !g2)
+ /* Grabbing the pointer may fail e.g. if the user is doing a drag'n drop */
+ if (!g1)
{
TRACE ("grab failed in clientCycle");
@@ -545,7 +547,11 @@ clientCycle (Client * c, XKeyEvent * ev)
}
myScreenUngrabKeyboard (screen_info, myDisplayGetCurrentTime (display_info));
- myScreenUngrabPointer (screen_info, myDisplayGetCurrentTime (display_info));
+ if (g2)
+ {
+ /* If we succeeded in grabbing the pointer, release it */
+ myScreenUngrabPointer (screen_info, myDisplayGetCurrentTime (display_info));
+ }
}
gboolean
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list