mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
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.
This commit is contained in:
parent
dcc967d1ad
commit
345909c009
3 changed files with 8 additions and 6 deletions
|
@ -104,6 +104,8 @@ void Canvas::draw(Gfx::Painter& painter)
|
|||
painter.draw_scaled_bitmap({ 202, 39, 80, 40 }, *buggie, Gfx::IntRect { 2, 30, 62, 20 });
|
||||
|
||||
painter.draw_tiled_bitmap({ 25, 60, WIDTH - 50, 40 }, *buggie);
|
||||
|
||||
painter.blit({ 25, 101 }, *buggie, { 2, 30, 3 * buggie->width(), 20 });
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue