From 2eab26f675193ed660c4bbe41308a5188d57e69b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Mon, 24 Feb 2020 19:01:40 +0100
Subject: [PATCH 5/6] windowPreview: Only hide the close button if no entry
child has pointer
---
windowPreview.js | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/windowPreview.js b/windowPreview.js
index 784a8e0..32d0fe6 100644
--- a/windowPreview.js
+++ b/windowPreview.js
@@ -485,9 +485,8 @@ class DashToDock_WindowPreviewMenuItem extends PopupMenu.PopupBaseMenuItem {
}
_onLeave() {
- if (!this._cloneBin.has_pointer &&
- !this.closeButton.has_pointer)
- this._hideCloseButton();
+ this._hideCloseButton();
+ }
return Clutter.EVENT_PROPAGATE;
}
@@ -495,9 +494,7 @@ class DashToDock_WindowPreviewMenuItem extends PopupMenu.PopupBaseMenuItem {
_idleToggleCloseButton() {
this._idleToggleCloseId = 0;
- if (!this._cloneBin.has_pointer &&
- !this.closeButton.has_pointer)
- this._hideCloseButton();
+ this._hideCloseButton();
return GLib.SOURCE_REMOVE;
}
@@ -516,6 +513,10 @@ class DashToDock_WindowPreviewMenuItem extends PopupMenu.PopupBaseMenuItem {
}
_hideCloseButton() {
+ if (this.closeButton.has_pointer ||
+ this.get_children().some(a => a.has_pointer))
+ return;
+
this.closeButton.remove_all_transitions();
this.closeButton.ease({
opacity: 0,
--
2.24.1