[gnome-shell] overviewControls: Remove transitions before updating adjustment value
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] overviewControls: Remove transitions before updating adjustment value
- Date: Tue, 28 Apr 2020 08:13:13 +0000 (UTC)
commit 2e80995f190f56812c94eb344768e6c94f0683f0
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Apr 28 01:04:08 2020 +0200
overviewControls: Remove transitions before updating adjustment value
The workspace switcher blocks state updates while the indicator is
animating. Since commit 9c1940ef9db5 the indicator is considered to
be animating when the workspace adjustment's value doesn't equal the
active workspace.
There is one case though where this breaks badly: When a workspace
is inserted before the active one, the adjustment's upper and value
properties are changed without transitions. But if that change happens
while there's an ongoing transition to the previously active workspace,
the value gets out of sync with the active workspace and we end up
blocking state updates indefinitely.
Fix this by removing any transitions before setting the adjustment
value.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2625
js/ui/overviewControls.js | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index cc430f918d..d1aac35937 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -473,6 +473,7 @@ class ControlsManager extends St.Widget {
// A workspace might have been inserted or removed before the active
// one, causing the adjustment to go out of sync, so update the value
+ this._workspaceAdjustment.remove_transition('value');
this._workspaceAdjustment.value = activeIndex;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]