From 2e407554bedc9c35a9633f0bb82ad5e7212473df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Tue, 3 Mar 2020 15:54:18 +0100 Subject: [PATCH] maximized: fix y position of eg. firefox wayland Some windows apparently report the wrong frame.y value when they've just been maximized, leaving us with the old incorrect value. Simply hardcode the correct y value instead. --- tiling.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tiling.js b/tiling.js index ceee955..c2f0e41 100644 --- a/tiling.js +++ b/tiling.js @@ -337,7 +337,9 @@ class Space extends Array { targetHeight = f.height; } if (mw.maximized_vertically) { - y = f.y - space.monitor.y; + // NOTE: This should really be f.y - monitor.y, but eg. firefox + // on wayland reports the wrong y coordinates at this point. + y = y - prefs.vertical_margin; } // When resize is synchronous, ie. for X11 windows