diff options
author | Tom <tomut@yahoo.com> | 2020-08-20 17:20:30 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-21 12:00:24 +0200 |
commit | 5c60a6a8fbb21cd8de4a68778814c442b2835ca5 (patch) | |
tree | 688df7b9969959510d0e4d54d9ffc4b666c9e6e4 | |
parent | 7902d215b3986148b292b80ac7515974088a98e6 (diff) | |
download | serenity-5c60a6a8fbb21cd8de4a68778814c442b2835ca5.zip |
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
-rw-r--r-- | Services/WindowServer/AppletManager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Services/WindowServer/AppletManager.cpp b/Services/WindowServer/AppletManager.cpp index 6da3a3716a..18b50cda30 100644 --- a/Services/WindowServer/AppletManager.cpp +++ b/Services/WindowServer/AppletManager.cpp @@ -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()); } |