From 393365ed05e71194bdbdd2595486334960ff58cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Br=C3=B8nner?= Date: Sun, 19 May 2019 19:41:49 +0200 Subject: [PATCH] Bugfix: broken resizing of vertically tiled window in some multimonitor setups Global y coordinate was used in calculations, breaking things for vertically stacked monitors. --- tiling.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tiling.js b/tiling.js index 0e56694..127d1c7 100644 --- a/tiling.js +++ b/tiling.js @@ -275,12 +275,13 @@ class Space extends Array { const gap = prefs.window_gap; const f = grabWindow.get_frame_rect(); + let yGrabRel = f.y - this.monitor.y; targetWidth = f.width; - const H1 = (f.y - y0) - gap - (k-1)*gap; - const H2 = availableHeight - (f.y + f.height - y0) - gap - (column.length-k-2)*gap; + const H1 = (yGrabRel - y0) - gap - (k-1)*gap; + const H2 = availableHeight - (yGrabRel + f.height - y0) - gap - (column.length-k-2)*gap; k > 0 && mosh(column.slice(0, k), H1, y0); - let y = mosh(column.slice(k, k+1), f.height, f.y); + let y = mosh(column.slice(k, k+1), f.height, yGrabRel); k+1 < column.length && mosh(column.slice(k+1), H2, y); return [targetWidth, needRelayout];