From cdc40e82f67c83fc577372404916547a575a180a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Br=C3=B8nner?= Date: Mon, 18 Sep 2017 20:05:54 +0200 Subject: [PATCH] Some comments on window positioning --- tiling.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tiling.js b/tiling.js index 65f64e9..169686e 100644 --- a/tiling.js +++ b/tiling.js @@ -362,6 +362,12 @@ add_handler = (ws, meta_window) => { meta_window.scrollwm_initial_position = {x:frame.x + frame.width + window_gap, y:statusbar_height + margin_tb}; } + // If window is receiving focus the focus handler will do the correct thing. + // Otherwise we need set the correct position: + // For new windows this must be done in 'first-frame' signal. + // Existing windows being moved need a new position in this workspace. This + // can be done here since the window is fully initialized. + // Maxmize height. Setting position here doesn't work... meta_window.move_resize_frame(true, 0, 0, meta_window.get_frame_rect().width, global.screen_height - statusbar_height - margin_tb*2);