1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:17:34 +00:00

WindowServer: Fix drawing wallpaper on additional screens

We need to translate the source rectangle relative to the screen
location when blitting from the wallpaper bitmap.
This commit is contained in:
Tom 2023-02-17 21:18:02 -07:00 committed by Linus Groh
parent 15d4903efb
commit 328a64fbdc

View file

@ -320,7 +320,7 @@ void Compositor::compose()
painter.draw_tiled_bitmap(rect, *m_wallpaper);
} else if (m_wallpaper_mode == WallpaperMode::Stretch) {
VERIFY(screen.compositor_screen_data().m_wallpaper_bitmap);
painter.blit(rect.location(), *screen.compositor_screen_data().m_wallpaper_bitmap, rect);
painter.blit(rect.location(), *screen.compositor_screen_data().m_wallpaper_bitmap, rect.translated(-screen.location()));
} else {
VERIFY_NOT_REACHED();
}