XCB/globalhostkeys: add support for meta modifier
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 6 Nov 2013 20:30:10 +0000 (22:30 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 6 Nov 2013 20:30:10 +0000 (22:30 +0200)
modules/control/globalhotkeys/xcb.c

index 8a4cca9..c6a43de 100644 (file)
@@ -237,12 +237,17 @@ static unsigned GetX11Modifier( xcb_connection_t *p_connection,
     if( i_vlc & KEY_MODIFIER_ALT )
         i_mask |= GetModifier( p_connection, p_symbols, XK_Alt_L ) |
                   GetModifier( p_connection, p_symbols, XK_Alt_R );
-    if( i_vlc & KEY_MODIFIER_CTRL )
-        i_mask |= GetModifier( p_connection, p_symbols, XK_Control_L ) |
-                  GetModifier( p_connection, p_symbols, XK_Control_R );
     if( i_vlc & KEY_MODIFIER_SHIFT )
         i_mask |= GetModifier( p_connection, p_symbols, XK_Shift_L ) |
                   GetModifier( p_connection, p_symbols, XK_Shift_R );
+    if( i_vlc & KEY_MODIFIER_CTRL )
+        i_mask |= GetModifier( p_connection, p_symbols, XK_Control_L ) |
+                  GetModifier( p_connection, p_symbols, XK_Control_R );
+    if( i_vlc & KEY_MODIFIER_META )
+        i_mask |= GetModifier( p_connection, p_symbols, XK_Meta_L ) |
+                  GetModifier( p_connection, p_symbols, XK_Meta_R ) |
+                  GetModifier( p_connection, p_symbols, XK_Super_L ) |
+                  GetModifier( p_connection, p_symbols, XK_Super_R );
     return i_mask;
 }