[mutter] keybindings: Add an accessor for window grab modifiers



commit f88c20f335d25156a272a3f2ac922e1662b6cc17
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Aug 14 15:52:32 2014 -0400

    keybindings: Add an accessor for window grab modifiers
    
    Since we're going to seal it away in the future.

 src/core/keybindings-private.h |    2 ++
 src/core/keybindings.c         |    6 ++++++
 src/core/window.c              |    2 +-
 3 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/core/keybindings-private.h b/src/core/keybindings-private.h
index 1e6816f..01b45ff 100644
--- a/src/core/keybindings-private.h
+++ b/src/core/keybindings-private.h
@@ -106,6 +106,8 @@ gboolean meta_keybindings_process_event     (MetaDisplay        *display,
 void     meta_display_process_mapping_event (MetaDisplay *display,
                                              XEvent      *event);
 
+ClutterModifierType meta_display_get_window_grab_modifiers (MetaDisplay *display);
+
 gboolean meta_prefs_add_keybinding          (const char           *name,
                                              GSettings            *settings,
                                              MetaKeyBindingAction  action,
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 87b2660..e3524c2 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -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
 meta_display_grab_window_buttons (MetaDisplay *display,
                                   Window       xwindow)
diff --git a/src/core/window.c b/src/core/window.c
index 127dc2a..129a56c 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6113,7 +6113,7 @@ button_event_is_window_grab (MetaDisplay *display,
                              const ClutterEvent *event)
 {
   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;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]