[gtk+/gtk-3-2] x11: Correct GroupSwitch mask



commit d7c460288ae879c2ad5bc7806fb65c237f81f1a7
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Feb 29 16:15:10 2012 +0000

    x11: Correct GroupSwitch mask
    
    base | latched | locked is incorrect for the group mask,
    and the clamping has already been applied.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=671070

 gdk/x11/gdkdevice-xi2.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index bc6261b..6f4eeaa 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -739,16 +739,7 @@ _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
     }
 
   if (group_state)
-    {
-      gint group;
-
-      group = group_state->base | group_state->latched | group_state->locked;
-
-      /* FIXME: do we need the XKB complications for this ? */
-      group = CLAMP(group, 0, 3);
-
-      state |= group << 13;
-    }
+    state |= (group_state->effective) << 13;
 
   return state;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]