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
This commit is contained in:
parent
722bef3d0c
commit
c8cb84b533
@ -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,
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user