From 991f6ef508caad15398c0171199edcbab5fc3042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 21 Oct 2020 20:24:18 +0200 Subject: [PATCH] workspace-indicator: Account for monitor offset in window previews Windows' frame rects are in screen coordinates, while the workspace thumbnails are based on the monitor work area. Unless we account for the difference, previews end up mispositioned in multi-monitor setups. Part-of: (cherry picked from commit 6949a5d075ef773cfae289976d8b5713aad26508) --- extensions/workspace-indicator/extension.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js index 6452eefb..d10e13e8 100644 --- a/extensions/workspace-indicator/extension.js +++ b/extensions/workspace-indicator/extension.js @@ -97,8 +97,8 @@ class WorkspaceLayout extends Clutter.LayoutManager { Math.round(Math.min(frameRect.width, workArea.width) * hscale), Math.round(Math.min(frameRect.height, workArea.height) * vscale)); childBox.set_origin( - Math.round(frameRect.x * hscale), - Math.round(frameRect.y * vscale)); + Math.round((frameRect.x - workArea.x) * hscale), + Math.round((frameRect.y - workArea.y) * vscale)); child.allocate(childBox); } }