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: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/363>
(cherry picked from commit 77a11fd9cd)
This commit is contained in:
Florian Müllner
2024-12-02 14:45:42 +01:00
parent 62ccff1558
commit 363f396365

View File

@@ -39,7 +39,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();
@@ -68,7 +68,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();
}
}