forked from AuroraMiddleware/gtk
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.
(cherry picked from commit 0488c28488
)
This commit is contained in:
parent
fe23dc2c10
commit
d915d17ff6
@ -951,6 +951,13 @@ fill_key_event (GdkWindow *window,
|
|||||||
|
|
||||||
event->key.state |= _gdk_quartz_events_get_current_mouse_modifiers ();
|
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 (gdk_keymap_get_for_display (_gdk_display),
|
||||||
|
&event->key.state);
|
||||||
|
|
||||||
event->key.string = NULL;
|
event->key.string = NULL;
|
||||||
|
|
||||||
/* Fill in ->string since apps depend on it, taken from the x11 backend. */
|
/* Fill in ->string since apps depend on it, taken from the x11 backend. */
|
||||||
|
Loading…
Reference in New Issue
Block a user