]> git.sur5r.net Git - i3/i3/commitdiff
Fix bindings using Mode_switch
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 7 Mar 2015 13:51:24 +0000 (14:51 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 7 Mar 2015 13:52:32 +0000 (14:52 +0100)
fixes #1518

src/bindings.c
src/handlers.c

index e7e424cc4b3a7ac89634686b6326033d0c226c7e..cbac2dfd96dfd0f3826dcb669ab9b5400fb720f1 100644 (file)
@@ -211,7 +211,7 @@ Binding *get_binding_from_xcb_event(xcb_generic_event_t *event) {
     state_filtered &= 0xFF;
     DLOG("(removed upper 8 bits, state = %d)\n", state_filtered);
 
-    if (xkb_current_group == XkbGroup2Index)
+    if (xkb_current_group == XCB_XKB_GROUP_2)
         state_filtered |= BIND_MODE_SWITCH;
 
     DLOG("(checked mode_switch, state %d)\n", state_filtered);
@@ -294,8 +294,8 @@ void translate_keysyms(void) {
             bind->translated_to[bind->number_keycodes - 1] = i;
         }
 
-        DLOG("Translated symbol \"%s\" to %d keycode\n", bind->symbol,
-             bind->number_keycodes);
+        DLOG("Translated symbol \"%s\" to %d keycode (mods %d)\n", bind->symbol,
+             bind->number_keycodes, bind->mods);
     }
 }
 
index 529a4b58c34deda1b63612f006f167c0812366dd..7a6ab8dbc620d4e997c2fccd4e35a7540bd5d8fa 100644 (file)
@@ -1267,7 +1267,7 @@ void handle_event(int type, xcb_generic_event_t *event) {
             /* See The XKB Extension: Library Specification, section 14.1 */
             /* We check if the current group (each group contains
              * two levels) has been changed. Mode_switch activates
-             * group XkbGroup2Index */
+             * group XCB_XKB_GROUP_2 */
             if (xkb_current_group == state->group)
                 return;
             xkb_current_group = state->group;
@@ -1277,7 +1277,7 @@ void handle_event(int type, xcb_generic_event_t *event) {
                 grab_all_keys(conn, false);
             } else {
                 DLOG("Mode_switch enabled\n");
-                grab_all_keys(conn, false);
+                grab_all_keys(conn, true);
             }
         }