[gnome-shell] workspacesView: Small cleanup
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspacesView: Small cleanup
- Date: Fri, 26 Jun 2020 14:29:53 +0000 (UTC)
commit da738988cd9a7396baeb553e90f7355ac8137ca7
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jun 26 00:25:22 2020 +0200
workspacesView: Small cleanup
scrollToActive() and friends are only used for handling the 'switch-workspace'
animation.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1333
js/ui/workspacesView.js | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 0728d2151c..a6098cac41 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -508,25 +508,11 @@ class WorkspacesDisplay extends St.Widget {
workspaceManager.get_active_workspace_index();
}
- _activeWorkspaceChanged(_wm, _from, _to, _direction) {
- if (this._gestureActive)
- return;
-
- this._scrollToActive();
- }
-
- _scrollToActive() {
- let workspaceManager = global.workspace_manager;
- let active = workspaceManager.get_active_workspace_index();
-
- this._updateScrollAdjustment(active);
- }
-
- _updateScrollAdjustment(index) {
+ _activeWorkspaceChanged(_wm, _from, to, _direction) {
if (this._gestureActive)
return;
- this._scrollAdjustment.ease(index, {
+ this._scrollAdjustment.ease(to, {
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
duration: WORKSPACE_SWITCH_TIME,
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]