linux-packaging-mono/external/bockbuild/packages/patches/gtk/flip-command-mask-between-mod1-and-mod2.patch
Xamarin Public Jenkins (auto-signing) 6bdd276d05 Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
2017-04-10 11:41:01 +00:00

24 lines
1.0 KiB
Diff

commit d15d466cc479630ac27925b0edaa769c5ab0bead
Author: Cody Russell <cody@jhu.edu>
Date: Tue Jan 13 16:44:46 2015 -0600
[GtkNSView] Flip command mask between MOD1 and MOD2 depending on gdk_quartz_get_fix_modifiers
diff --git a/gtk/gtknsview.c b/gtk/gtknsview.c
index ad003d9..d5f8c76 100644
--- a/gtk/gtknsview.c
+++ b/gtk/gtknsview.c
@@ -700,9 +700,11 @@ gtk_ns_view_key_press (GtkWidget *widget,
NSWindow *ns_window = [ns_view->priv->view window];
NSResponder *responder = [ns_window firstResponder];
+ gint command_mask = gdk_quartz_get_fix_modifiers () ? GDK_MOD2_MASK : GDK_MOD1_MASK;
+
if ([responder isKindOfClass: [NSTextView class]] &&
(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK |
- GDK_MOD1_MASK | GDK_MOD2_MASK)) == GDK_MOD2_MASK)
+ GDK_MOD1_MASK | GDK_MOD2_MASK)) == command_mask)
{
NSTextView *text_view = (NSTextView *) responder;
NSRange range = [text_view selectedRange];