From fff958568db5f7da37695e9deb56ff656c4e4dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Sun, 22 Apr 2018 06:08:00 +0200 Subject: [PATCH] Use monitor relative coordinates in ensureViewport The whole pipeline assumes coordinates being relative, correcting them back to absolute coordinates in move. --- tiling.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tiling.js b/tiling.js index 048d844..e8eb6e7 100644 --- a/tiling.js +++ b/tiling.js @@ -705,6 +705,10 @@ function ensureViewport(meta_window, space, force) { frame.width, primary.height - panelBox.height - margin_tb*2); + // Use monitor relative coordinates. + frame.x -= primary.x; + frame.y -= primary.y; + if (meta_window.destinationX !== undefined) // Use the destination of the window if available frame.x = meta_window.destinationX;