[gnome-shell] Make all our window clones use the MetaWindowActor as source



commit 7746f1a5c43e94bef1470c69f491eff0ba6531b6
Author: Rui Matos <tiagomatos gmail com>
Date:   Wed Feb 1 19:01:47 2017 +0100

    Make all our window clones use the MetaWindowActor as source
    
    Using a MetaWindowActor's shaped texture as the source for window
    clones means that if there are further MetaSurfaceActor children
    (e.g. a wayland client using sub-surfaces) they don't get cloned.
    
    This obviously wasn't an issue until wayland clients introduced the
    possibility of having multiple MetaSurfaceActors under a
    MetaWindowActor but there's no fundamental reason we can't clone the
    toplevel actor.
    
    WorkspaceThumbnail.WindowClone is the one class that was already using
    the MetaWindowActor instead of the texture although it seems to have
    been an unintended change in commit
    8b99617513da1713ff88ca4abf54e6125405d31c.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756715

 js/ui/altTab.js    |    5 ++---
 js/ui/overview.js  |    2 +-
 js/ui/workspace.js |    2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index d101335..9530681 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -33,10 +33,9 @@ const AppIconMode = {
 };
 
 function _createWindowClone(window, size) {
-    let windowTexture = window.get_texture();
-    let [width, height] = windowTexture.get_size();
+    let [width, height] = window.get_size();
     let scale = Math.min(1.0, size / width, size / height);
-    return new Clutter.Clone({ source: windowTexture,
+    return new Clutter.Clone({ source: window,
                                width: width * scale,
                                height: height * scale,
                                x_align: Clutter.ActorAlign.CENTER,
diff --git a/js/ui/overview.js b/js/ui/overview.js
index ab95ddb..04a92b5 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -378,7 +378,7 @@ const Overview = new Lang.Class({
             return null;
 
         let window = windows[0];
-        let clone = new Clutter.Clone({ source: window.get_texture(),
+        let clone = new Clutter.Clone({ source: window,
                                         x: window.x, y: window.y });
         clone.source.connect('destroy', Lang.bind(this, function() {
             clone.destroy();
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index bacc75b..a1d1582 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -111,7 +111,7 @@ const WindowClone = new Lang.Class({
         this.metaWindow._delegate = this;
         this._workspace = workspace;
 
-        this._windowClone = new Clutter.Clone({ source: realWindow.get_texture() });
+        this._windowClone = new Clutter.Clone({ source: realWindow });
         // We expect this.actor to be used for all interaction rather than
         // this._windowClone; as the former is reactive and the latter
         // is not, this just works for most cases. However, for DND all


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