[gnome-shell-extensions/ws-thumb-fixes: 12/13] window-list: Use overlap to determine preview visibility
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/ws-thumb-fixes: 12/13] window-list: Use overlap to determine preview visibility
- Date: Sat, 21 Nov 2020 00:33:59 +0000 (UTC)
commit 081244365d224e8b0e4b4bad0a91fba982c1a1ca
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Oct 21 20:40:56 2020 +0200
window-list: Use overlap to determine preview visibility
extensions/window-list/workspaceIndicator.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/extensions/window-list/workspaceIndicator.js b/extensions/window-list/workspaceIndicator.js
index 3dbfb0c..721edc0 100644
--- a/extensions/window-list/workspaceIndicator.js
+++ b/extensions/window-list/workspaceIndicator.js
@@ -61,8 +61,9 @@ class WindowPreview extends St.Button {
}
_updateVisible() {
- let monitor = Main.layoutManager.findIndexForActor(this);
- this.visible = monitor === this._window.get_monitor() &&
+ const monitor = Main.layoutManager.findIndexForActor(this);
+ const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor);
+ this.visible = this._window.get_frame_rect().overlap(workArea) &&
this._window.window_type !== Meta.WindowType.DESKTOP &&
this._window.showing_on_its_workspace();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]