From c8ea06be264ba794986ecb3fa3e47337c1a872db Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 28 Jun 2018 18:08:46 +0200 Subject: [PATCH] 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. --- js/ui/workspaceThumbnail.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index cf21e1317..b64882147 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -151,7 +151,7 @@ var WindowClone = new Lang.Class({ _doAddAttachedDialog(metaDialog, realDialog) { let clone = new Clutter.Clone({ source: realDialog }); - this._updateDialogPosition(realDialog, clone); + this._updateDialogPosition(metaDialog, clone); clone._updateId = realDialog.connect('notify::position', dialog => { this._updateDialogPosition(dialog, clone); @@ -162,8 +162,7 @@ var WindowClone = new Lang.Class({ this.actor.add_child(clone); }, - _updateDialogPosition(realDialog, cloneDialog) { - let metaDialog = realDialog.meta_window; + _updateDialogPosition(metaDialog, cloneDialog) { let dialogRect = metaDialog.get_frame_rect(); let rect = this.metaWindow.get_frame_rect();