[gnome-shell] overviewControls: Stop transitions when starting a gesture



commit 77023135acdafcc17633e66bf5dd75ee93f4487b
Author: Sebastian Keller <skeller gnome org>
Date:   Thu Apr 29 15:51:11 2021 +0200

    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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1828>

 js/ui/overviewControls.js | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index 811d7c2023..13535d0689 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();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]