[gnome-shell/wip/fmuellner/window-preview-translucency: 9/9] workspace: Set offscreen redirect on window previews



commit b7c9f130fa6509729bd2e4bb40b807ca3700cfab
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Nov 13 17:24:37 2018 +0100

    workspace: Set offscreen redirect on window previews
    
    Window previews are sometimes shown translucent, for example during
    drags or animations. They can also have attached dialogs, in which
    case the opacity should affect the combination of all windows instead
    of being applied to each window individually, blended together, so
    make sure they are redirected as a whole when necessary.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/774

 js/ui/workspace.js | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 2b703346e..0f8ba2b34 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -140,6 +140,8 @@ var WindowClone = new Lang.Class({
                       layout_manager: new WindowCloneLayout() });
         this.actor = this;
 
+        this.set_offscreen_redirect(Clutter.OffscreenRedirect.AUTOMATIC_FOR_OPACITY);
+
         this.add_child(this._windowClone);
 
         this._delegate = this;
@@ -194,6 +196,10 @@ var WindowClone = new Lang.Class({
         this._closeRequested = false;
     },
 
+    vfunc_has_overlaps() {
+        return this.hasAttachedDialogs();
+    },
+
     set slot(slot) {
         this._slot = slot;
     },


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