[gnome-shell/gbsneto/content-part2: 1/3] workspace: Replace ClutterClone by MetaWindowContent
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/content-part2: 1/3] workspace: Replace ClutterClone by MetaWindowContent
- Date: Thu, 17 Oct 2019 06:51:12 +0000 (UTC)
commit 5743b52ec88bb9908f19ae133f3b1527f3f71be6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Oct 16 18:16:12 2019 +0200
workspace: Replace ClutterClone by MetaWindowContent
js/ui/workspace.js | 12 ++++++------
js/ui/workspaceThumbnail.js | 8 +++++---
2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index ac53fa41cd..3e67cb84e8 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -84,7 +84,7 @@ class WindowCloneLayout extends Clutter.LayoutManager {
if (child == container._windowClone)
realWindow = container.realWindow;
else
- realWindow = child.source;
+ realWindow = child.content.window_actor;
child.allocate(this._makeBoxForWindow(realWindow.meta_window),
flags);
@@ -110,7 +110,7 @@ var WindowClone = GObject.registerClass({
this.metaWindow._delegate = this;
this._workspace = workspace;
- this._windowClone = new Clutter.Clone({ source: realWindow });
+ this._windowClone = new Clutter.Actor({ content: realWindow.content });
// We expect this 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
@@ -197,7 +197,7 @@ var WindowClone = GObject.registerClass({
// Delete all windows, starting from the bottom-most (most-modal) one
let windows = this.get_children();
for (let i = windows.length - 1; i >= 1; i--) {
- let realWindow = windows[i].source;
+ let realWindow = windows[i].content.window_actor;
let metaWindow = realWindow.meta_window;
metaWindow.delete(global.get_current_time());
@@ -229,7 +229,7 @@ var WindowClone = GObject.registerClass({
}
_doAddAttachedDialog(metaWin, realWin) {
- let clone = new Clutter.Clone({ source: realWin });
+ let clone = new Clutter.Actor({ content: realWin.content });
clone._sizeChangedId = metaWin.connect('size-changed',
this._onMetaWindowSizeChanged.bind(this));
clone._posChangedId = metaWin.connect('position-changed',
@@ -282,7 +282,7 @@ var WindowClone = GObject.registerClass({
if (child == this._windowClone)
realWindow = this.realWindow;
else
- realWindow = child.source;
+ realWindow = child.content.window_actor;
let metaWindow = realWindow.meta_window;
rect = rect.union(metaWindow.get_frame_rect());
@@ -327,7 +327,7 @@ var WindowClone = GObject.registerClass({
if (child == this._windowClone)
realWindow = this.realWindow;
else
- realWindow = child.source;
+ realWindow = child.content.window_actor;
realWindow.meta_window.disconnect(child._sizeChangedId);
realWindow.meta_window.disconnect(child._posChangedId);
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index ff23d9e2e7..c614df6fa7 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -53,7 +53,8 @@ var WindowClone = GObject.registerClass({
}
}, class WindowClone extends Clutter.Actor {
_init(realWindow) {
- let clone = new Clutter.Clone({ source: realWindow });
+ let clone = new Clutter.Actor({ content: realWindow.content,
+ request_mode: Clutter.RequestMode.CONTENT_SIZE });
super._init({
layout_manager: new PrimaryActorLayout(clone),
reactive: true
@@ -137,7 +138,8 @@ var WindowClone = GObject.registerClass({
}
_doAddAttachedDialog(metaDialog, realDialog) {
- let clone = new Clutter.Clone({ source: realDialog });
+ let clone = new Clutter.Actor({ content: realDialog.content,
+ request_mode: Clutter.RequestMode.CONTENT_SIZE });
this._updateDialogPosition(realDialog, clone);
clone._updateId = realDialog.connect('notify::position', dialog => {
@@ -163,7 +165,7 @@ var WindowClone = GObject.registerClass({
_disconnectSignals() {
this.get_children().forEach(child => {
- let realWindow = child.source;
+ let realWindow = child.content.window_actor;
realWindow.disconnect(child._updateId);
realWindow.disconnect(child._destroyId);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]