[gnome-shell] windowPreview: Consider chrome overlaps when offscreening for opacity



commit 1bd2b0123ea9b47fbf8b2b0518a4309ed7a7fadc
Author: Sebastian Keller <skeller gnome org>
Date:   Tue Feb 16 11:45:50 2021 +0100

    windowPreview: Consider chrome overlaps when offscreening for opacity
    
    The icon and close button might be overlapping the window actor but
    were not considered in has_overlaps() which gets used to decide whether
    to offscreen the actor for transparency. Since currently the icon is
    visible when the preview is dragged and the whole actor is turned
    transparent, the opacity will not be applied to everything as a whole
    but the child actors individually. This leads to the window becoming
    visible behind the icon.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1684>

 js/ui/windowPreview.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/windowPreview.js b/js/ui/windowPreview.js
index 12215e0525..996d66bf55 100644
--- a/js/ui/windowPreview.js
+++ b/js/ui/windowPreview.js
@@ -595,7 +595,9 @@ var WindowPreview = GObject.registerClass({
     }
 
     vfunc_has_overlaps() {
-        return this._hasAttachedDialogs();
+        return this._hasAttachedDialogs() ||
+            this._icon.visible ||
+            this._closeButton.visible;
     }
 
     _deleteAll() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]