From 77a4e432d43931fb16f9a50523f9e2c65b6f2abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Tue, 26 Sep 2017 15:28:03 +0200 Subject: [PATCH] Position the first window on a workspace correctly --- tiling.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tiling.js b/tiling.js index 49e860e..0e402f6 100644 --- a/tiling.js +++ b/tiling.js @@ -125,8 +125,10 @@ insertWindow = function(space, metaWindow, index) { space.splice(index, 0, metaWindow); if (index == 0) { + let frame = metaWindow.get_frame_rect(); metaWindow.scrollwm_initial_position = - {x: primary.x, y: primary.y + panelBox.height + margin_tb}; + {x: primary.x + (primary.width - frame.width)/2, + y: primary.y + panelBox.height + margin_tb}; } else { let frame = space[index - 1].get_frame_rect() metaWindow.scrollwm_initial_position =