mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 01:32:14 -05:00
WindowServer: Fix MenuApplets painting
We need to clip painting to the actual size to prevent corrupting the area outside of the applet as the backing store is not guaranteed to be perfectly in sync. Fixes #3107
This commit is contained in:
parent
7902d215b3
commit
5c60a6a8fb
Notes:
sideshowbarker
2024-07-19 03:23:03 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/5c60a6a8fbb Pull-request: https://github.com/SerenityOS/serenity/pull/3238 Issue: https://github.com/SerenityOS/serenity/issues/3107
1 changed files with 2 additions and 0 deletions
|
@ -126,6 +126,8 @@ void AppletManager::draw_applet(const Window& applet)
|
|||
return;
|
||||
|
||||
Gfx::Painter painter(*MenuManager::the().window().backing_store());
|
||||
Gfx::PainterStateSaver saver(painter);
|
||||
painter.add_clip_rect(applet.rect_in_menubar());
|
||||
painter.fill_rect(applet.rect_in_menubar(), WindowManager::the().palette().window());
|
||||
painter.blit(applet.rect_in_menubar().location(), *applet.backing_store(), applet.backing_store()->rect());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue