keybindings: Handle META_KEY_ABOVE_TAB in get_keycodes_for_keysym
We're going to switch to get_keycodes_for_keysym for the other bindings, so add that special case here.
This commit is contained in:
parent
96b6dcec01
commit
4daf20483d
@ -311,6 +311,14 @@ get_keycodes_for_keysym (MetaDisplay *display,
|
|||||||
|
|
||||||
retval = g_array_new (FALSE, FALSE, sizeof (int));
|
retval = g_array_new (FALSE, FALSE, sizeof (int));
|
||||||
|
|
||||||
|
/* Special-case: Fake mutter keysym */
|
||||||
|
if (keysym == META_KEY_ABOVE_TAB)
|
||||||
|
{
|
||||||
|
keycode = meta_display_get_above_tab_keycode (display);
|
||||||
|
g_array_append_val (retval, keycode);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
keycode = display->min_keycode;
|
keycode = display->min_keycode;
|
||||||
while (keycode <= display->max_keycode)
|
while (keycode <= display->max_keycode)
|
||||||
{
|
{
|
||||||
@ -328,9 +336,9 @@ get_keycodes_for_keysym (MetaDisplay *display,
|
|||||||
++keycode;
|
++keycode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
n_keycodes = retval->len;
|
n_keycodes = retval->len;
|
||||||
*keycodes = (int*) g_array_free (retval, n_keycodes == 0 ? TRUE : FALSE);
|
*keycodes = (int*) g_array_free (retval, n_keycodes == 0 ? TRUE : FALSE);
|
||||||
|
|
||||||
return n_keycodes;
|
return n_keycodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user