From 7a186cd5686d3eeb274bbaba6d8b4d6f28a97ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Thu, 21 Sep 2017 22:44:32 +0200 Subject: [PATCH] Center more wide windows Be more liberal with what we consider to be a wide window. Another option is having the cutoff be `stack_margin + window_gap` which means we'll center as long as there's no other non-scaled window on the screen. --- tiling.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiling.js b/tiling.js index 337d098..07b478d 100644 --- a/tiling.js +++ b/tiling.js @@ -130,7 +130,7 @@ ensure_viewport = (meta_window, force) => { // Share the available margin evenly between left and right // if the window is wide (should probably use a quotient larger than 2) let margin = margin_lr - if (frame.width > global.screen_width - 2 * margin_lr) + if (frame.width > global.screen_width - 3*stack_margin) margin = (global.screen_width - frame.width)/2; // Hack to ensure the statusbar is visible while there's a fullscreen