gnome-shell-extensions/more-ws-previews-0025-workspace-indicator-Stop-handling-vertical-layouts.patch

45 lines
1.9 KiB
Diff
Raw Normal View History

From 1805cceb598d1ed6fd2039453242b28e44e079e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Tue, 20 Feb 2024 21:43:55 +0100
Subject: [PATCH 25/28] workspace-indicator: Stop handling vertical layouts
Both the regular session and GNOME classic use a horizontal layout
nowadays, so it doesn't seem worth to specifically handle vertical
layouts anymore.
The extension will still work when the layout is changed (by some
other extension), there will simply be a mismatch between horizontal
previews and the actual layout.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/316>
---
extensions/workspace-indicator/workspaceIndicator.js | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/extensions/workspace-indicator/workspaceIndicator.js b/extensions/workspace-indicator/workspaceIndicator.js
index e6aa68bf..087d2d89 100644
--- a/extensions/workspace-indicator/workspaceIndicator.js
+++ b/extensions/workspace-indicator/workspaceIndicator.js
@@ -463,7 +463,6 @@ export class WorkspaceIndicator extends PanelMenu.Button {
workspaceManager.connectObject(
'notify::n-workspaces', this._nWorkspacesChanged.bind(this), GObject.ConnectFlags.AFTER,
'workspace-switched', this._onWorkspaceSwitched.bind(this), GObject.ConnectFlags.AFTER,
- 'notify::layout-rows', this._updateThumbnailVisibility.bind(this),
this);
this.connect('scroll-event',
@@ -497,9 +496,7 @@ export class WorkspaceIndicator extends PanelMenu.Button {
_updateThumbnailVisibility() {
const {workspaceManager} = global;
- const vertical = workspaceManager.layout_rows === -1;
- const useMenu =
- vertical || workspaceManager.n_workspaces > MAX_THUMBNAILS;
+ const useMenu = workspaceManager.n_workspaces > MAX_THUMBNAILS;
this.reactive = useMenu;
this._statusLabel.visible = useMenu;
--
2.44.0