Backport upstream patch to fix scrolling to incorrect positions
This commit is contained in:
		
							parent
							
								
									4ba8655a98
								
							
						
					
					
						commit
						ef4dc0232a
					
				
							
								
								
									
										50
									
								
								0001-inputMethod-Clear-preeditStr-before-reset.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								0001-inputMethod-Clear-preeditStr-before-reset.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,50 @@ | |||||||
|  | From 380d2db1d9047ecffcef7d78f00184963b403efc Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Christian Hergert <chergert@redhat.com> | ||||||
|  | Date: Wed, 29 Sep 2021 12:46:45 -0700 | ||||||
|  | Subject: [PATCH] inputMethod: Clear preeditStr before reset | ||||||
|  | 
 | ||||||
|  | Previously, these were performed in a different order before GNOME 41. | ||||||
|  | During some other changes they were swapped. | ||||||
|  | 
 | ||||||
|  | However, this causes both GTK 3 and GTK 4 applications to scroll to | ||||||
|  | incorrect positions from the preedit change. | ||||||
|  | 
 | ||||||
|  | Fixes #4647 | ||||||
|  | Fixes GNOME/gtk#4289 | ||||||
|  | Fixes GNOME/gnome-builder#1536 | ||||||
|  | Fixes GNOME/gnome-builder#1531 | ||||||
|  | 
 | ||||||
|  | Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1993> | ||||||
|  | ---
 | ||||||
|  |  js/misc/inputMethod.js | 10 +++++----- | ||||||
|  |  1 file changed, 5 insertions(+), 5 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js
 | ||||||
|  | index 25b02e35b..1f9eaee7a 100644
 | ||||||
|  | --- a/js/misc/inputMethod.js
 | ||||||
|  | +++ b/js/misc/inputMethod.js
 | ||||||
|  | @@ -179,16 +179,16 @@ class InputMethod extends Clutter.InputMethod {
 | ||||||
|  |      } | ||||||
|  |   | ||||||
|  |      vfunc_reset() { | ||||||
|  | +        if (this._context) {
 | ||||||
|  | +            this._context.reset();
 | ||||||
|  | +            this._emitRequestSurrounding();
 | ||||||
|  | +        }
 | ||||||
|  | +
 | ||||||
|  |          if (this._preeditStr !== null) { | ||||||
|  |              // Unset any preedit text | ||||||
|  |              this.set_preedit_text(null, 0, Clutter.PreeditResetMode.CLEAR); | ||||||
|  |              this._preeditStr = null; | ||||||
|  |          } | ||||||
|  | -
 | ||||||
|  | -        if (this._context) {
 | ||||||
|  | -            this._context.reset();
 | ||||||
|  | -            this._emitRequestSurrounding();
 | ||||||
|  | -        }
 | ||||||
|  |      } | ||||||
|  |   | ||||||
|  |      vfunc_set_cursor_location(rect) { | ||||||
|  | -- 
 | ||||||
|  | 2.31.1 | ||||||
|  | 
 | ||||||
| @ -2,7 +2,7 @@ | |||||||
| 
 | 
 | ||||||
| Name:           gnome-shell | Name:           gnome-shell | ||||||
| Version:        41.0 | Version:        41.0 | ||||||
| Release:        1%{?dist} | Release:        2%{?dist} | ||||||
| Summary:        Window management and application launching for GNOME | Summary:        Window management and application launching for GNOME | ||||||
| 
 | 
 | ||||||
| License:        GPLv2+ | License:        GPLv2+ | ||||||
| @ -12,6 +12,10 @@ Source0: http://download.gnome.org/sources/gnome-shell/41/%{name}-%{tarball_vers | |||||||
| # Replace Epiphany with Firefox in the default favourite apps list | # Replace Epiphany with Firefox in the default favourite apps list | ||||||
| Patch1: gnome-shell-favourite-apps-firefox.patch | Patch1: gnome-shell-favourite-apps-firefox.patch | ||||||
| 
 | 
 | ||||||
|  | # Backported from upstream | ||||||
|  | # https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1993 | ||||||
|  | Patch2: 0001-inputMethod-Clear-preeditStr-before-reset.patch | ||||||
|  | 
 | ||||||
| # Some users might have a broken PAM config, so we really need this | # Some users might have a broken PAM config, so we really need this | ||||||
| # downstream patch to stop trying on configuration errors. | # downstream patch to stop trying on configuration errors. | ||||||
| Patch10005: 0001-gdm-Work-around-failing-fingerprint-auth.patch | Patch10005: 0001-gdm-Work-around-failing-fingerprint-auth.patch | ||||||
| @ -230,6 +234,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de | |||||||
| %{_mandir}/man1/gnome-shell.1* | %{_mandir}/man1/gnome-shell.1* | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Tue Oct 05 2021 Kalev Lember <klember@redhat.com> - 41.0-2 | ||||||
|  | - Backport upstream patch to fix scrolling to incorrect positions | ||||||
|  | 
 | ||||||
| * Sun Sep 19 2021 Florian Müllner <fmuellner@redhat.com> - 41.0-1 | * Sun Sep 19 2021 Florian Müllner <fmuellner@redhat.com> - 41.0-1 | ||||||
| - Update to 41.0 | - Update to 41.0 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user