From 7952b00ef2fe686eb2646c3f9f344aa308d41f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Thu, 19 Apr 2018 05:15:31 +0200 Subject: [PATCH] Switch to active workspace properly on startup/restart --- navigator.js | 13 +++++-------- tiling.js | 2 ++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/navigator.js b/navigator.js index 4b4d500..bde0e47 100644 --- a/navigator.js +++ b/navigator.js @@ -250,13 +250,7 @@ var PreviewedWindowNavigator = new Lang.Class({ let last = multimap.minimaps[multimap.selectedIndex - 1]; switchWorkspace( last && last.space.workspace, - this.space.workspace, - () => { - let cloneParent = this.space.cloneContainer.get_parent(); - cloneParent.set_child_above_sibling( - this.space.cloneContainer, - multimap.minimaps[0].space.cloneContainer); - }); + this.space.workspace); if (this.space.length === 0) { this.space.workspace.activate(global.get_current_time()); @@ -323,7 +317,10 @@ function switchWorkspace(from, to, callback) { scale_y: 1, time: 0.25, transition: 'easeInOutQuad', - onComplete: callback + onComplete: () => { + toSpace.cloneContainer.raise_top(); + callback && callback(); + } }); if (!from || from === to) diff --git a/tiling.js b/tiling.js index c762171..84c597e 100644 --- a/tiling.js +++ b/tiling.js @@ -119,6 +119,8 @@ function enable() { actor.connect('show', showWrapper) ]; }); + + Navigator.switchWorkspace(null, global.screen.get_active_workspace()); } if (isDuringGnomeShellStartup) {