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>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user