From a02399eea4a3fbf46aa3be35198f6ad3b861e6c8 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Tue, 22 Aug 2017 19:05:11 +0200 Subject: [PATCH] workspace: Align window previews with the pixel grid Now that full-sized window previews are allowed again it makes sense to align the window previews with the pixel grid to prevent unscaled windows from looking blurry in the overview. --- js/ui/workspace.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index eb24e2538..e6a6da919 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -948,6 +948,10 @@ var LayoutStrategy = new Lang.Class({ let cloneX = x + (cellWidth - cloneWidth) / 2; let cloneY = row.y + row.height * row.additionalScale - cellHeight + compensation; + // Align with the pixel grid to prevent blurry windows at scale = 1 + cloneX = Math.floor(cloneX); + cloneY = Math.floor(cloneY); + slots.push([cloneX, cloneY, s, window]); x += cellWidth + this._columnSpacing; }