From b39333c8dbda902c89a7e1fda5fa50b98f391d6e Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 11 Sep 2018 00:15:01 -0700 Subject: Revert a problematic change that breaks several things (GGO #1316) --- Revert-imwayland-clear-preedit-on-focus-out.patch | 60 +++++++++++++++++++++++ gtk3.spec | 9 +++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 Revert-imwayland-clear-preedit-on-focus-out.patch diff --git a/Revert-imwayland-clear-preedit-on-focus-out.patch b/Revert-imwayland-clear-preedit-on-focus-out.patch new file mode 100644 index 0000000..a2f1679 --- /dev/null +++ b/Revert-imwayland-clear-preedit-on-focus-out.patch @@ -0,0 +1,60 @@ +From: Simon McVittie +Date: Sun, 9 Sep 2018 23:06:12 +0100 +Subject: Revert "imwayland: clear preedit on focus out" + +This appears to cause the gnome-terminal cursor to disappear on focus +changes. Revert it for now as a workaround. + +This reverts commit 49b17e6c1e853e81e2087a989524d8e0cad08d05. + +Bug: https://gitlab.gnome.org/GNOME/gtk/issues/1316 +Bug-Debian: https://bugs.debian.org/908120 +Forwarded: no +--- + modules/input/imwayland.c | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/modules/input/imwayland.c b/modules/input/imwayland.c +index 11d09d2..3589c4c 100644 +--- a/modules/input/imwayland.c ++++ b/modules/input/imwayland.c +@@ -135,7 +135,18 @@ static void + text_input_leave (void *data, + struct zwp_text_input_v3 *text_input, + struct wl_surface *surface) +-{} ++{ ++ /* ++ GtkIMContextWayland *context; ++ ++ if (!global->current) ++ return; ++ ++ context = GTK_IM_CONTEXT_WAYLAND (global->current); ++ TODO: does this clear text input or modify text? ++ reset_preedit (context); ++ */ ++} + + static void + text_input_preedit (void *data, +@@ -158,6 +169,7 @@ text_input_preedit (void *data, + context->pending_preedit.cursor_end = cursor_end; + } + ++ + static void + text_input_preedit_apply (GtkIMContextWaylandGlobal *global) + { +@@ -652,11 +664,6 @@ gtk_im_context_wayland_focus_out (GtkIMContext *context) + + zwp_text_input_v3_disable (global->text_input); + commit_state (context_wayland); +- +- /* after disable, incoming state changes won't take effect anyway */ +- text_input_preedit (global, global->text_input, "", 0, 0); +- text_input_preedit_apply (global); +- + global->current = NULL; + } + diff --git a/gtk3.spec b/gtk3.spec index 5df5fc0..f392dea 100644 --- a/gtk3.spec +++ b/gtk3.spec @@ -21,7 +21,7 @@ Name: gtk3 Version: 3.24.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: GTK+ graphical user interface library License: LGPLv2+ @@ -31,6 +31,10 @@ Source0: http://download.gnome.org/sources/gtk+/3.24/gtk+-%{version}.tar.xz # Backported from upstream Patch0: 0001-GtkApplication-Fix-CRITICAL-on-shutdown-when-registe.patch Patch1: 0001-Fix-portal-path-handling.patch +# https://salsa.debian.org/gnome-team/gtk3/blob/debian/master/debian/patches/Revert-imwayland-clear-preedit-on-focus-out.patch +# revert a problematic commit to fix +# https://gitlab.gnome.org/GNOME/gtk/issues/1316#note_312942 +Patch2: Revert-imwayland-clear-preedit-on-focus-out.patch BuildRequires: pkgconfig(atk) >= %{atk_version} BuildRequires: pkgconfig(atk-bridge-2.0) @@ -324,6 +328,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &>/dev/null || : %{_datadir}/installed-tests %changelog +* Mon Sep 10 2018 Adam Williamson - 3.24.0-4 +- Revert a problematic change that breaks several things (GGO #1316) + * Fri Sep 07 2018 Kalev Lember - 3.24.0-3 - Rebuilt against fixed atk (#1626575) -- cgit