diff options
author | Nico Weber <thakis@chromium.org> | 2021-01-22 18:56:01 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-23 08:31:41 +0100 |
commit | 345909c009679f5edf10cefca78089b4d1fe7eba (patch) | |
tree | 4bd1a9dc79d6d17259bd731d0aa9c1921b0b6dd4 /Userland/Services/WindowServer/Compositor.cpp | |
parent | dcc967d1ad031ad1e6285d732c18396a2a1da11c (diff) | |
download | serenity-345909c009679f5edf10cefca78089b4d1fe7eba.zip |
WindowServer: Don't crash on wallpapers smaller than the desktop with fill mode 'simple'
blit() calls draw_scaled_bitmap() behind the scenes in scaled contexts,
and that doesn't like src_rect to be outside of the source bitmap's
bounds. Implicitly clip with the source rect, like the non-scaled
codepath already does.
Fixes #5017 even more.
Diffstat (limited to 'Userland/Services/WindowServer/Compositor.cpp')
-rw-r--r-- | Userland/Services/WindowServer/Compositor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Services/WindowServer/Compositor.cpp b/Userland/Services/WindowServer/Compositor.cpp index 9d2d025e02..38156ac218 100644 --- a/Userland/Services/WindowServer/Compositor.cpp +++ b/Userland/Services/WindowServer/Compositor.cpp @@ -246,7 +246,7 @@ void Compositor::compose() auto temp_painter = *m_temp_painter; auto paint_wallpaper = [&](Gfx::Painter& painter, const Gfx::IntRect& rect) { - // FIXME: If the wallpaper is opaque, no need to fill with color! + // FIXME: If the wallpaper is opaque and covers the whole rect, no need to fill with color! painter.fill_rect(rect, background_color); if (m_wallpaper) { if (m_wallpaper_mode == WallpaperMode::Simple) { |