1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

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.
This commit is contained in:
FrHun 2022-12-06 00:07:40 +01:00 committed by Sam Atkins
parent 4236177e4f
commit 6187cfec49

View file

@ -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());