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.
This commit is contained in:
Tor Hedin Brønner
2017-09-21 23:02:02 +02:00
parent 1a95f82a6d
commit 7a186cd568
+1 -1
View File
@@ -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