diff options
author | Cody Russell <cody@jhu.edu> | 2017-09-21 19:02:58 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-09-21 19:02:58 +0300 |
commit | 5a701284b6a08f17348f5934dcd90d8232093c0f (patch) | |
tree | a1d9bf2df29b3055a3e7bff48351eed61842f80b | |
parent | e024c5cbd0c58dbb5edc0306a5340afa7fe29c09 (diff) |
[gtk] Fix crashing when using Third-party IME (#51)2017-08
-rw-r--r-- | packages/gtk+.py | 5 | ||||
-rw-r--r-- | packages/patches/gtk/update_only_apple_keyboard_layout.patch | 31 |
2 files changed, 35 insertions, 1 deletions
diff --git a/packages/gtk+.py b/packages/gtk+.py index 6c2a28e..3da799e 100644 --- a/packages/gtk+.py +++ b/packages/gtk+.py @@ -202,7 +202,10 @@ class GtkPackage (GnomeGitPackage): # 'patches/gtk/gtk-new-screen-updates-api.patch', # https://bugzilla.xamarin.com/show_bug.cgi?id=5162 - 'patches/gtk/get-ascii-capable-keyboard-input-source.patch' + # 'patches/gtk/get-ascii-capable-keyboard-input-source.patch', + + # https://developercommunity.visualstudio.com/content/problem/104471/visual-studio-for-mac-720540-cannot-launch-exc-bre.html + 'patches/gtk/update_only_apple_keyboard_layout.patch' ]) def prep(self): diff --git a/packages/patches/gtk/update_only_apple_keyboard_layout.patch b/packages/patches/gtk/update_only_apple_keyboard_layout.patch new file mode 100644 index 0000000..9dd382f --- /dev/null +++ b/packages/patches/gtk/update_only_apple_keyboard_layout.patch @@ -0,0 +1,31 @@ +commit 0fb9feb1c32491aaf00350c1038367d5614e9574 +Author: Yusuke Yamada <yamachu.dev@gmail.com> +Date: Mon Sep 18 11:06:12 2017 +0900 + + [gtk] Fix crashing when using Third-party IME + +diff --git a/gdk/quartz/gdkkeys-quartz.c b/gdk/quartz/gdkkeys-quartz.c +index b96683c488..9a66d13902 100644 +--- a/gdk/quartz/gdkkeys-quartz.c ++++ b/gdk/quartz/gdkkeys-quartz.c +@@ -56,6 +56,7 @@ + #include "gdk.h" + #include "gdkkeysyms.h" + #include "gdkprivate-quartz.h" ++#include <Foundation/Foundation.h> + + #define NUM_KEYCODES 128 + #define KEYVALS_PER_KEYCODE 4 +@@ -286,6 +287,12 @@ update_keymap (void) + keyval_array = g_new0 (guint, NUM_KEYCODES * KEYVALS_PER_KEYCODE); + + #ifdef __LP64__ ++ TISInputSourceRef new_ascii_layout = TISCopyCurrentASCIICapableKeyboardInputSource(); ++ NSString *sourceId = TISGetInputSourceProperty(new_ascii_layout, kTISPropertyInputSourceID); ++ if ([sourceId hasPrefix:@"com.apple.keylayout"]) ++ { ++ new_layout = new_ascii_layout; ++ } + layout_data_ref = (CFDataRef) TISGetInputSourceProperty + (new_layout, kTISPropertyUnicodeKeyLayoutData); + |