keybindings: Add an accessor for window grab modifiers

Since we're going to seal it away in the future.
This commit is contained in:
Jasper St. Pierre 2014-08-14 15:52:32 -04:00
parent c98824bc9e
commit f88c20f335
3 changed files with 9 additions and 1 deletions

View File

@ -106,6 +106,8 @@ gboolean meta_keybindings_process_event (MetaDisplay *display,
void meta_display_process_mapping_event (MetaDisplay *display, void meta_display_process_mapping_event (MetaDisplay *display,
XEvent *event); XEvent *event);
ClutterModifierType meta_display_get_window_grab_modifiers (MetaDisplay *display);
gboolean meta_prefs_add_keybinding (const char *name, gboolean meta_prefs_add_keybinding (const char *name,
GSettings *settings, GSettings *settings,
MetaKeyBindingAction action, MetaKeyBindingAction action,

View File

@ -1013,6 +1013,12 @@ meta_change_button_grab (MetaDisplay *display,
} }
} }
ClutterModifierType
meta_display_get_window_grab_modifiers (MetaDisplay *display)
{
return display->window_grab_modifiers;
}
void void
meta_display_grab_window_buttons (MetaDisplay *display, meta_display_grab_window_buttons (MetaDisplay *display,
Window xwindow) Window xwindow)

View File

@ -6113,7 +6113,7 @@ button_event_is_window_grab (MetaDisplay *display,
const ClutterEvent *event) const ClutterEvent *event)
{ {
ClutterModifierType mods = event->button.modifier_state; ClutterModifierType mods = event->button.modifier_state;
ClutterModifierType grab_mods = display->window_grab_modifiers; ClutterModifierType grab_mods = meta_display_get_window_grab_modifiers (display);
return (mods & grab_mods) == grab_mods; return (mods & grab_mods) == grab_mods;
} }