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>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user