[geany/geany] 83e8ae: Make sure GDK_MOD2_MASK is cleared when getting modifiers
Jiří Techet
git-noreply at xxxxx
Thu Oct 12 17:27:56 UTC 2017
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Thu, 12 Oct 2017 17:27:56 UTC
Commit: 83e8ae1737910d9be8520ac9246cc8f77703040d
https://github.com/geany/geany/commit/83e8ae1737910d9be8520ac9246cc8f77703040d
Log Message:
-----------
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. <Command>S leads to <Commands><Mod2>S and none of the
keybindings work under GTK 3.
Modified Paths:
--------------
src/keybindings.c
Modified: src/keybindings.c
3 lines changed, 3 insertions(+), 0 deletions(-)
===================================================================
@@ -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();
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list