keybindings: Make devirtualize_modifiers a private function

This is now only used internally in keybindings.c
This commit is contained in:
Jasper St. Pierre 2014-08-14 15:08:47 -04:00
parent 586f118279
commit a3bb6c12e5
2 changed files with 8 additions and 15 deletions

View File

@ -117,8 +117,4 @@ GList *meta_prefs_get_keybindings (void);
void meta_prefs_get_overlay_binding (MetaKeyCombo *combo); void meta_prefs_get_overlay_binding (MetaKeyCombo *combo);
const char *meta_prefs_get_iso_next_group_option (void); const char *meta_prefs_get_iso_next_group_option (void);
void meta_display_devirtualize_modifiers (MetaDisplay *display,
MetaVirtualModifier modifiers,
unsigned int *mask);
#endif #endif

View File

@ -527,8 +527,8 @@ reload_keycodes (MetaDisplay *display)
g_hash_table_foreach (display->key_bindings, binding_reload_keycode_foreach, display); g_hash_table_foreach (display->key_bindings, binding_reload_keycode_foreach, display);
} }
void static void
meta_display_devirtualize_modifiers (MetaDisplay *display, devirtualize_modifiers (MetaDisplay *display,
MetaVirtualModifier modifiers, MetaVirtualModifier modifiers,
unsigned int *mask) unsigned int *mask)
{ {
@ -564,9 +564,7 @@ binding_reload_modifiers_foreach (gpointer key,
MetaDisplay *display = data; MetaDisplay *display = data;
MetaKeyBinding *binding = value; MetaKeyBinding *binding = value;
meta_display_devirtualize_modifiers (display, devirtualize_modifiers (display, binding->modifiers, &binding->mask);
binding->modifiers,
&binding->mask);
meta_topic (META_DEBUG_KEYBINDINGS, meta_topic (META_DEBUG_KEYBINDINGS,
" Devirtualized mods 0x%x -> 0x%x (%s)\n", " Devirtualized mods 0x%x -> 0x%x (%s)\n",
binding->modifiers, binding->modifiers,
@ -1104,8 +1102,7 @@ update_window_grab_modifiers (MetaDisplay *display)
unsigned int mods; unsigned int mods;
virtual_mods = meta_prefs_get_mouse_button_mods (); virtual_mods = meta_prefs_get_mouse_button_mods ();
meta_display_devirtualize_modifiers (display, virtual_mods, devirtualize_modifiers (display, virtual_mods, &mods);
&mods);
display->window_grab_modifiers = mods; display->window_grab_modifiers = mods;
} }
@ -1511,7 +1508,7 @@ meta_display_grab_accelerator (MetaDisplay *display,
return META_KEYBINDING_ACTION_NONE; return META_KEYBINDING_ACTION_NONE;
} }
meta_display_devirtualize_modifiers (display, modifiers, &mask); devirtualize_modifiers (display, modifiers, &mask);
keycode = get_first_keycode_for_keysym (display, keysym); keycode = get_first_keycode_for_keysym (display, keysym);
if (keycode == 0) if (keycode == 0)
@ -1565,7 +1562,7 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
if (!grab) if (!grab)
return FALSE; return FALSE;
meta_display_devirtualize_modifiers (display, grab->combo->modifiers, &mask); devirtualize_modifiers (display, grab->combo->modifiers, &mask);
keycode = get_first_keycode_for_keysym (display, grab->combo->keysym); keycode = get_first_keycode_for_keysym (display, grab->combo->keysym);
binding = display_get_keybinding (display, keycode, mask); binding = display_get_keybinding (display, keycode, mask);