From 1a40f6176cd0c80ffe664de9463da345d1fd8199 Mon Sep 17 00:00:00 2001 From: jderose9 Date: Wed, 4 Jan 2017 17:23:55 -0500 Subject: [PATCH] async popup stealing focus on window activations When switching apps, sometimes the hover popup would activate after the new window was activated, partially stealing focus and leaving new window in a frozen state. Unfortunately I couldn't get this working async to debounce quick mouseovers of the icon. I've only observed in X11 so the previous implementation may be ok in Wayland. --- windowPreview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windowPreview.js b/windowPreview.js index b7ef7e1..a93cd9d 100644 --- a/windowPreview.js +++ b/windowPreview.js @@ -109,7 +109,7 @@ const thumbnailPreviewMenu = new Lang.Class({ this.shouldOpen = true; this.shouldClose = false; - Mainloop.timeout_add(Taskbar.DASH_ITEM_HOVER_TIMEOUT, Lang.bind(this, this.hoverOpen)); + this.hoverOpen(); }, _onMenuLeave: function () { @@ -122,7 +122,7 @@ const thumbnailPreviewMenu = new Lang.Class({ this.shouldOpen = true; this.shouldClose = false; - Mainloop.timeout_add(Taskbar.DASH_ITEM_HOVER_TIMEOUT, Lang.bind(this, this.hoverOpen)); + this.hoverOpen(); }, _onLeave: function () {