[gnome-shell-extensions] screenshot-window-sizer: Remove superfluous check



commit faabfa11c2c42ddfd7d1ea788fbc2c401517556e
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jun 9 18:11:32 2022 +0200

    screenshot-window-sizer: Remove superfluous check
    
    We already filter out sizes that don't fit the screen when
    building the scaledSizes array, no need to check again.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/232>

 extensions/screenshot-window-sizer/extension.js | 4 ----
 1 file changed, 4 deletions(-)
---
diff --git a/extensions/screenshot-window-sizer/extension.js b/extensions/screenshot-window-sizer/extension.js
index 997bb70..1b57fd6 100644
--- a/extensions/screenshot-window-sizer/extension.js
+++ b/extensions/screenshot-window-sizer/extension.js
@@ -101,10 +101,6 @@ function cycleScreenshotSizes(display, window, binding) {
     for (let i = 0; i < scaledSizes.length; i++) {
         let [width, height] = scaledSizes[i];
 
-        // ignore sizes bigger than the workArea
-        if (width > workArea.width || height > workArea.height)
-            continue;
-
         // get the best initial window size
         let error = Math.abs(width - outerRect.width) + Math.abs(height - outerRect.height);
         if (nearestIndex === undefined || error < nearestError) {


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