[Xfce4-commits] [xfce/xfwm4] 01/01: Ungrab even if grab failed
noreply at xfce.org
noreply at xfce.org
Sat Jan 17 21:42:28 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 830edad5808d5ea0ab642e0e771d3c9ed806246b
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sat Jan 17 21:39:21 2015 +0100
Ungrab even if grab failed
Fix issue introduced by previous commit, ungrab even if grab failed
because of the internal grab counter.
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/cycle.c | 6 +-----
src/screen.c | 4 ++--
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/cycle.c b/src/cycle.c
index 1df14df..8fba978 100644
--- a/src/cycle.c
+++ b/src/cycle.c
@@ -547,11 +547,7 @@ clientCycle (Client * c, XKeyEvent * ev)
}
myScreenUngrabKeyboard (screen_info, myDisplayGetCurrentTime (display_info));
- if (g2)
- {
- /* If we succeeded in grabbing the pointer, release it */
- myScreenUngrabPointer (screen_info, myDisplayGetCurrentTime (display_info));
- }
+ myScreenUngrabPointer (screen_info, myDisplayGetCurrentTime (display_info));
}
gboolean
diff --git a/src/screen.c b/src/screen.c
index b57f523..095b371 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -504,7 +504,7 @@ myScreenUngrabKeyboard (ScreenInfo *screen_info, guint32 timestamp)
g_return_val_if_fail (screen_info, 0);
TRACE ("entering myScreenUngrabKeyboard");
- screen_info->key_grabs = screen_info->key_grabs - 1;
+ screen_info->key_grabs--;
if (screen_info->key_grabs < 0)
{
screen_info->key_grabs = 0;
@@ -524,7 +524,7 @@ myScreenUngrabPointer (ScreenInfo *screen_info, guint32 timestamp)
g_return_val_if_fail (screen_info, 0);
TRACE ("entering myScreenUngrabPointer");
- screen_info->pointer_grabs = screen_info->pointer_grabs - 1;
+ screen_info->pointer_grabs--;
if (screen_info->pointer_grabs < 0)
{
screen_info->pointer_grabs = 0;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list