From 96f5e2b33e21403dea307e1eed8ba58e4c28fdb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Mon, 8 Jun 2020 14:49:09 +0200 Subject: [PATCH] workspace: Call _activate() directly when clicking the window preview We can remove the simply callback function in favour of an anonymous function here. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307 --- js/ui/workspace.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 7370a137a..a5cd522d3 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -247,7 +247,7 @@ var WindowPreview = GObject.registerClass({ this.y = this.boundingBox.y; let clickAction = new Clutter.ClickAction(); - clickAction.connect('clicked', this._onClicked.bind(this)); + clickAction.connect('clicked', () => this._activate()); clickAction.connect('long-press', this._onLongPress.bind(this)); this.add_action(clickAction); this.connect('destroy', this._onDestroy.bind(this)); @@ -686,10 +686,6 @@ var WindowPreview = GObject.registerClass({ return super.vfunc_key_press_event(keyEvent); } - _onClicked() { - this._activate(); - } - _onLongPress(action, actor, state) { // Take advantage of the Clutter policy to consider // a long-press canceled when the pointer movement