From 83e8ae1737910d9be8520ac9246cc8f77703040d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= Date: Thu, 12 Oct 2017 19:27:56 +0200 Subject: [PATCH] Make sure GDK_MOD2_MASK is cleared when getting modifiers gtk_accelerator_get_default_mod_mask() behaves differently on OS X under GTK 3 when compared to GTK 2. On GTK 2 it used to clear the GDK_MOD2_MASK bit while on GTK 3 it's preserved. We need to clear it ourselves otherwise e.g. S leads to S and none of the keybindings work under GTK 3. --- src/keybindings.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/keybindings.c b/src/keybindings.c index 77f868c2..5be9d63e 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -124,7 +124,10 @@ GdkModifierType keybindings_get_modifiers(GdkModifierType mods) { #ifdef __APPLE__ if (mods & GDK_MOD2_MASK) + { mods |= GEANY_PRIMARY_MOD_MASK; + mods &= ~GDK_MOD2_MASK; + } #endif return mods & gtk_accelerator_get_default_mod_mask(); }