workspace, workspaceThumbnail: Use window content (WIP)
This commit is contained in:
parent
08464eadff
commit
602cec9b8e
@ -86,7 +86,7 @@ class WindowCloneLayout extends Clutter.LayoutManager {
|
||||
if (child == container._delegate._windowClone)
|
||||
realWindow = container._delegate.realWindow;
|
||||
else
|
||||
realWindow = child.source;
|
||||
realWindow = child.content.window_actor;
|
||||
|
||||
child.allocate(this._makeBoxForWindow(realWindow.meta_window),
|
||||
flags);
|
||||
@ -111,7 +111,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
|
||||
@ -205,7 +205,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());
|
||||
@ -237,7 +237,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',
|
||||
@ -290,7 +290,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());
|
||||
@ -335,7 +335,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);
|
||||
|
@ -47,7 +47,8 @@ class PrimaryActorLayout extends Clutter.FixedLayout {
|
||||
|
||||
var WindowClone = class {
|
||||
constructor(realWindow) {
|
||||
this.clone = new Clutter.Clone({ source: realWindow });
|
||||
this.clone = new Clutter.Actor({ content: realWindow.content,
|
||||
request_mode: Clutter.RequestMode.CONTENT_SIZE });
|
||||
|
||||
/* Can't use a Shell.GenericContainer because of DND and reparenting... */
|
||||
this.actor = new Clutter.Actor({ layout_manager: new PrimaryActorLayout(this.clone),
|
||||
@ -139,7 +140,8 @@ var WindowClone = class {
|
||||
}
|
||||
|
||||
_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 => {
|
||||
@ -165,7 +167,7 @@ var WindowClone = class {
|
||||
|
||||
_disconnectSignals() {
|
||||
this.actor.get_children().forEach(child => {
|
||||
let realWindow = child.source;
|
||||
let realWindow = child.content.window_actor;
|
||||
|
||||
realWindow.disconnect(child._updateId);
|
||||
realWindow.disconnect(child._destroyId);
|
||||
|
Loading…
Reference in New Issue
Block a user