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>
This commit is contained in:
Sebastian Keller 2021-02-16 11:45:50 +01:00 committed by Marge Bot
parent 8d5fb73695
commit 1bd2b0123e

View File

@ -595,7 +595,9 @@ var WindowPreview = GObject.registerClass({
}
vfunc_has_overlaps() {
return this._hasAttachedDialogs();
return this._hasAttachedDialogs() ||
this._icon.visible ||
this._closeButton.visible;
}
_deleteAll() {