From 77a11fd9cd9a4f7908fdf626929954491f4c13c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 2 Dec 2024 14:45:42 +0100 Subject: [PATCH] workspace-indicator: Do not only exclude DESKTOP windows There are other window types that should be excluded from workspace previews, including more common ones like menus. Instead of checking for a variety of window types, delegate the decision to mutter by checking for the `skip-taskbar` property. (The internal `skip-pager` property would be more apt in this case, but as it only differs from `skip-taskbar` for X11 clients that explicitly set one and not the other, it shouldn't matter in practice) Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/537 Part-of: --- extensions/workspace-indicator/workspaceIndicator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/workspace-indicator/workspaceIndicator.js b/extensions/workspace-indicator/workspaceIndicator.js index 18a8d4e9..9f54acbb 100644 --- a/extensions/workspace-indicator/workspaceIndicator.js +++ b/extensions/workspace-indicator/workspaceIndicator.js @@ -43,7 +43,7 @@ class WindowPreview extends St.Button { 'size-changed', () => this._checkRelayout(), 'position-changed', () => this._checkRelayout(), 'notify::minimized', this._updateVisible.bind(this), - 'notify::window-type', this._updateVisible.bind(this), + 'notify::skip-taskbar', this._updateVisible.bind(this), this); this._updateVisible(); @@ -72,7 +72,7 @@ class WindowPreview extends St.Button { } _updateVisible() { - this.visible = this._window.window_type !== Meta.WindowType.DESKTOP && + this.visible = !this._window.skip_taskbar && this._window.showing_on_its_workspace(); } }