[gtk+/gtk-2-24] quartz: add virtual modifiers already in GDK, just as X11 does it



commit 0488c284889e28b77763a3f131af44e9ac5ce488
Author: Michael Natterer <mitch lanedo com>
Date:   Thu Jan 19 16:12:11 2012 +0100

    quartz: add virtual modifiers already in GDK, just as X11 does it
    
    Key event states  will now always contain GDK_META_MASK in addition
    to GDK_MOD2_MASK.

 gdk/quartz/gdkevents-quartz.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 5bdab88..a8800f7 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -959,6 +959,12 @@ fill_key_event (GdkWindow    *window,
 
   event->key.state |= _gdk_quartz_events_get_current_mouse_modifiers ();
 
+  /* The X11 backend adds the first virtual modifier MOD2..MOD5 are
+   * mapped to. Since we only have one virtual modifier in the quartz
+   * backend, calling the standard function will do.
+   */
+  gdk_keymap_add_virtual_modifiers (NULL, &event->key.state);
+
   event->key.string = NULL;
 
   /* Fill in ->string since apps depend on it, taken from the x11 backend. */



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