From fa6e02c78cbd3efdc544620dd14d22e9e35b7c79 Mon Sep 17 00:00:00 2001 From: l3nn4rt Date: Tue, 6 Oct 2020 00:12:18 +0200 Subject: [PATCH] Fix #1172: switch workspace on thumbnail clicked If you click a thumbnailed window within a workspace preview, the shell behaves as expected; if you click a thumbnailed background, the overview is closed. Fix it by activating the workspace whose the picked actor is the thumbnailed background. --- overview.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/overview.js b/overview.js index 007c025..5ab10c9 100644 --- a/overview.js +++ b/overview.js @@ -472,6 +472,14 @@ var dtpOverview = Utils.defineClass({ || pickedActor == overviewControls.dash._container) { return Clutter.EVENT_PROPAGATE; } + + if (pickedActor instanceof Meta.BackgroundActor) { + overviewControls._thumbnailsBox._thumbnails.find(t => + pickedActor == t._bgManager.backgroundActor + ).activate(); + return Clutter.EVENT_STOP; + } + Main.overview.toggle(); } else { Main.overview.toggle();