]> Pileus Git - ~andy/gtk/commitdiff
x11: Correct GroupSwitch mask
authorBastien Nocera <hadess@hadess.net>
Wed, 29 Feb 2012 16:15:10 +0000 (16:15 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 4 Mar 2012 06:12:06 +0000 (01:12 -0500)
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

index 4426a0e6392ac84bf660312a50ee0d5645133bbc..80aa0b0d74369a7933c25dd98950b7f2f2c42218 100644 (file)
@@ -783,16 +783,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;
 }