From 77023135acdafcc17633e66bf5dd75ee93f4487b Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Thu, 29 Apr 2021 15:51:11 +0200 Subject: [PATCH] overviewControls: Stop transitions when starting a gesture When starting a gesture to open the overview while a transition to hide the overview is running, Overview._shown will be first set to false when starting the transition and then to true by the gesture before the `onComplete` callback is called. The `onComplete` callback in this case is `Overview._hideDone()` which starts a transition to show the overview again which also emits the `showing` signal. Since the gesture emits a `showing` signal as well, this results in two consecutive `showing` signals without a `hiding` signal in between. This breaks the `searchControler` which adds a key press handler to start the search on `showing` and removes it on `hiding`. So every time this happens a new handler that will never be removed is added, resulting in the first key press being repeated. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4004 Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3819 Part-of: --- js/ui/overviewControls.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 811d7c202..13535d068 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -728,6 +728,7 @@ class ControlsManager extends St.Widget { const cancelProgress = transition ? transition.get_interval().peek_final_value() : Math.round(progress); + this._stateAdjustment.remove_transition('value'); tracker.confirmSwipe(baseDistance, points, progress, cancelProgress); this._workspacesDisplay.prepareToEnterOverview();