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

github.com/mono/bockbuild.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Russell <cody@jhu.edu>2018-07-02 16:58:01 +0300
committerGitHub <noreply@github.com>2018-07-02 16:58:01 +0300
commit49f196cda788a4fef253b0b10e7227ea7dd54a0a (patch)
tree3175dbb1ac05b152e6a453edb209b20b585fe4c3
parentc47d9ace7b9178b39f5bd83d0d3ba2d8b4f70a3c (diff)
parent1e78f568ed6f7df600e8eae3363851bbbcad5f85 (diff)
Merge pull request #68 from mono/gtk-imquartz-commit-on-focus-out
[gtk] When focusing out, commit the preedit instead of discarding
-rw-r--r--packages/gtk+.py5
-rw-r--r--packages/patches/gtk/gtk-imquartz-commit-on-focus-out.patch44
2 files changed, 48 insertions, 1 deletions
diff --git a/packages/gtk+.py b/packages/gtk+.py
index 4e3ced2..3238919 100644
--- a/packages/gtk+.py
+++ b/packages/gtk+.py
@@ -210,7 +210,10 @@ class GtkPackage (GitHubPackage):
'patches/gtk/gtk-backing-scale-factor.patch',
- 'patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch'
+ 'patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch',
+
+ # https://devdiv.visualstudio.com/DevDiv/_workitems/edit/569768
+ 'patches/gtk/gtk-imquartz-commit-on-focus-out.patch'
])
def prep(self):
diff --git a/packages/patches/gtk/gtk-imquartz-commit-on-focus-out.patch b/packages/patches/gtk/gtk-imquartz-commit-on-focus-out.patch
new file mode 100644
index 0000000..87fdaa8
--- /dev/null
+++ b/packages/patches/gtk/gtk-imquartz-commit-on-focus-out.patch
@@ -0,0 +1,44 @@
+commit 5358d331a5a01fd7d11297b1686293251fd93197
+Author: Cody Russell <cody@jhu.edu>
+Date: Tue Jun 26 23:01:29 2018 -0500
+
+ When focusing out, commit the preedit instead of discarding.
+
+ Fixes VSTS #569768
+
+diff --git a/modules/input/imquartz.c b/modules/input/imquartz.c
+index c93330f22..7829929ac 100644
+--- a/modules/input/imquartz.c
++++ b/modules/input/imquartz.c
+@@ -277,6 +277,22 @@ quartz_reset (GtkIMContext *context)
+ discard_preedit (context);
+ }
+
++static void
++quartz_commit (GtkIMContext *context)
++{
++ GtkIMContextQuartz *qc = GTK_IM_CONTEXT_QUARTZ (context);
++ NSView *nsview;
++ GdkWindow *window;
++
++ if (!qc->client_window)
++ return;
++
++ nsview = gdk_quartz_window_get_nsview (qc->client_window);
++ window = (GdkWindow *)[(GdkQuartzView *)nsview gdkWindow];
++
++ output_result (context, window);
++}
++
+ static void
+ quartz_set_client_window (GtkIMContext *context, GdkWindow *window)
+ {
+@@ -305,7 +321,7 @@ quartz_focus_out (GtkIMContext *context)
+ qc->focused = FALSE;
+
+ /* Commit any partially built strings or it'll mess up other GTK+ widgets in the window */
+- discard_preedit (context);
++ quartz_commit (context);
+ }
+
+ static void