workspaceThumbnail: Pass MetaWindow to _updateDialogPosition

This function was mistakenly called with a MetaWindow as first
argument inside the ::position-changed callback, instead of a
MetaWindowActor as it should.

However, that function quickly grabs the MetaWindow from the
actor, and all calling places have the MetaWindow readily available,
so switch to handing it as first function parameter.

Fixes warnings on ::position-changed, because of the aforementioned
typo.
This commit is contained in:
Carlos Garnacho 2018-06-28 18:08:46 +02:00
parent d734b117e0
commit c8ea06be26

View File

@ -151,7 +151,7 @@ var WindowClone = new Lang.Class({
_doAddAttachedDialog(metaDialog, realDialog) { _doAddAttachedDialog(metaDialog, realDialog) {
let clone = new Clutter.Clone({ source: realDialog }); let clone = new Clutter.Clone({ source: realDialog });
this._updateDialogPosition(realDialog, clone); this._updateDialogPosition(metaDialog, clone);
clone._updateId = realDialog.connect('notify::position', dialog => { clone._updateId = realDialog.connect('notify::position', dialog => {
this._updateDialogPosition(dialog, clone); this._updateDialogPosition(dialog, clone);
@ -162,8 +162,7 @@ var WindowClone = new Lang.Class({
this.actor.add_child(clone); this.actor.add_child(clone);
}, },
_updateDialogPosition(realDialog, cloneDialog) { _updateDialogPosition(metaDialog, cloneDialog) {
let metaDialog = realDialog.meta_window;
let dialogRect = metaDialog.get_frame_rect(); let dialogRect = metaDialog.get_frame_rect();
let rect = this.metaWindow.get_frame_rect(); let rect = this.metaWindow.get_frame_rect();