From 6187cfec49225d091b7c8d0e4a30d7e324dc7dab Mon Sep 17 00:00:00 2001 From: FrHun <28605587+frhun@users.noreply.github.com> Date: Tue, 6 Dec 2022 00:07:40 +0100 Subject: [PATCH] WindowServer: Remove overcropping for magnifier This function is only used by the magnifier currently. Since we now apply the scaling factor in Bitmap::cropped(), this is not necessary anymore. --- Userland/Services/WindowServer/ConnectionFromClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Services/WindowServer/ConnectionFromClient.cpp b/Userland/Services/WindowServer/ConnectionFromClient.cpp index d65bbbe38a..faec4a77ed 100644 --- a/Userland/Services/WindowServer/ConnectionFromClient.cpp +++ b/Userland/Services/WindowServer/ConnectionFromClient.cpp @@ -1216,7 +1216,7 @@ Messages::WindowServer::GetScreenBitmapAroundLocationResponse ConnectionFromClie if (intersecting_with_screens == 1) { auto& screen = Screen::closest_to_rect(rect); - auto crop_rect = rect.translated(-screen.rect().location()) * screen.scale_factor(); + auto crop_rect = rect.translated(-screen.rect().location()); auto bitmap_or_error = Compositor::the().front_bitmap_for_screenshot({}, screen).cropped(crop_rect); if (bitmap_or_error.is_error()) { dbgln("get_screen_bitmap_around_cursor: Failed to crop screenshot: {}", bitmap_or_error.error());