[gtk-osx] Add IMQuartz-GdkWindow.patch to gtk+-3.0
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-osx] Add IMQuartz-GdkWindow.patch to gtk+-3.0
- Date: Mon, 14 Jan 2019 00:14:37 +0000 (UTC)
commit 167437e4f01176c41f39fd223939d97bb632b0a5
Author: John Ralls <jralls ceridwen us>
Date: Sun Jan 13 16:13:46 2019 -0800
Add IMQuartz-GdkWindow.patch to gtk+-3.0
modulesets-stable/gtk-osx.modules | 1 +
patches/IMQuartz-GdkWindow.patch | 47 +++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+)
---
diff --git a/modulesets-stable/gtk-osx.modules b/modulesets-stable/gtk-osx.modules
index 52176b1..d37bc70 100644
--- a/modulesets-stable/gtk-osx.modules
+++ b/modulesets-stable/gtk-osx.modules
@@ -237,6 +237,7 @@
<branch module="gtk+/3.24/gtk+-3.24.2.tar.xz" version="3.24.2"
hash="sha256:5b3b05e427cc928d103561ed2e91b2b2881fe88b1f167b0b1c9990da6aac8892">
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master//patches/gtk3-quartz-3-24-2-fixes.patch" strip="1"/>
+ <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/IMQuartz-GdkWindow.patch"
strip="1"/>
</branch>
<dependencies>
<dep package="glib"/>
diff --git a/patches/IMQuartz-GdkWindow.patch b/patches/IMQuartz-GdkWindow.patch
new file mode 100644
index 0000000..0adb29e
--- /dev/null
+++ b/patches/IMQuartz-GdkWindow.patch
@@ -0,0 +1,47 @@
+From ee0e59e6cf18d2a70bd5398189340eea74989753 Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls ceridwen us>
+Date: Sun, 13 Jan 2019 15:55:51 -0800
+Subject: [PATCH] [IMQuartz] Get the GdkWindow from the NSKeyEvent.
+
+Instead of from the IMContextQuartz's client window because the former
+is the event window where the text will be inserted. In some cases
+they're different and the text may be discarded (because the client
+window isn't editable) or misplaced.
+
+Fixes Bug 707945.
+---
+ modules/input/imquartz.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/modules/input/imquartz.c b/modules/input/imquartz.c
+index 46ceafe..bc2d895 100644
+--- a/modules/input/imquartz.c
++++ b/modules/input/imquartz.c
+@@ -190,11 +190,6 @@ quartz_filter_keypress (GtkIMContext *context,
+ if (!GDK_IS_QUARTZ_WINDOW (qc->client_window))
+ return FALSE;
+
+- nsview = gdk_quartz_window_get_nsview (qc->client_window);
+- win = (GdkWindow *)[ (GdkQuartzView *)nsview gdkWindow];
+- GTK_NOTE (MISC, g_print ("client_window: %p, win: %p, nsview: %p\n",
+- qc->client_window, win, nsview));
+-
+ NSEvent *nsevent = gdk_quartz_event_get_nsevent ((GdkEvent *)event);
+
+ if (!nsevent)
+@@ -206,6 +201,12 @@ quartz_filter_keypress (GtkIMContext *context,
+ return gtk_im_context_filter_keypress (qc->slave, event);
+ }
+
++ nsview = gdk_quartz_window_get_nsview (qc->client_window);
++
++ win = (GdkWindow *)[(GdkQuartzView *)[[nsevent window] contentView] gdkWindow];
++ GTK_NOTE (MISC, g_print ("client_window: %p, win: %p, nsview: %p\n",
++ qc->client_window, win, nsview));
++
+ if (event->type == GDK_KEY_RELEASE)
+ return FALSE;
+
+--
+2.2.2
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]