Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2011-11-22 01:34:12 +0400
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2011-11-22 01:49:45 +0400
commit6319bf9939cad13f480d5e5de0d5012fb3bbc8eb (patch)
treef0f081ee4f5d9cfaa522553fbc63b941bc08a1da /main/src/core
parent3fe6dd991519175ec57b1ecfcb5ac6ff40bb4004 (diff)
[Gtk] Opt into fixed modifier handling on new Mac GTK
Diffstat (limited to 'main/src/core')
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/GtkWorkarounds.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/GtkWorkarounds.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/GtkWorkarounds.cs
index d01d4c0194..892902ce5e 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/GtkWorkarounds.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/GtkWorkarounds.cs
@@ -94,8 +94,14 @@ namespace Mono.TextEditor
}
}
- //TODO: opt into the fixes on GTK+ >= 2.24.8
- oldMacKeyHacks = true;
+ //opt into the fixes on GTK+ >= 2.24.8
+ if (Platform.IsMac) {
+ try {
+ gdk_quartz_set_fix_modifiers (true);
+ } catch (EntryPointNotFoundException) {
+ oldMacKeyHacks = true;
+ }
+ }
keymap.KeysChanged += delegate {
mappedKeys.Clear ();
@@ -371,6 +377,10 @@ namespace Mono.TextEditor
[DllImport (PangoUtil.LIBGDK)]
extern static bool gdk_keymap_add_virtual_modifiers (IntPtr keymap, ref Gdk.ModifierType state);
+ //Custom patch in Mono Mac w/GTK+ 2.24.8+
+ [DllImport (PangoUtil.LIBGDK)]
+ extern static bool gdk_quartz_set_fix_modifiers (bool fix);
+
static Gdk.Keymap keymap = Gdk.Keymap.Default;
static Dictionary<long,MappedKeys> mappedKeys = new Dictionary<long,MappedKeys> ();