[gnome-shell-extensions/ws-thumb-fixes: 3/5] workspace-indicator: Account for monitor offset in window previews




commit d15979db22d49d391be4fbf4d049a08fe97424e3
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Oct 21 20:24:18 2020 +0200

    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.

 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 21080c1..8e7d297 100644
--- a/extensions/workspace-indicator/extension.js
+++ b/extensions/workspace-indicator/extension.js
@@ -97,8 +97,8 @@ class WorkspaceLayout extends Clutter.LayoutManager {
                 Math.min(frameRect.width, workArea.width) * hscale,
                 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);
         }
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]