Pārlūkot izejas kodu

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
Tom 5 gadi atpakaļ
vecāks
revīzija
5c60a6a8fb
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      Services/WindowServer/AppletManager.cpp

+ 2 - 0
Services/WindowServer/AppletManager.cpp

@@ -126,6 +126,8 @@ void AppletManager::draw_applet(const Window& applet)
         return;
         return;
 
 
     Gfx::Painter painter(*MenuManager::the().window().backing_store());
     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.fill_rect(applet.rect_in_menubar(), WindowManager::the().palette().window());
     painter.blit(applet.rect_in_menubar().location(), *applet.backing_store(), applet.backing_store()->rect());
     painter.blit(applet.rect_in_menubar().location(), *applet.backing_store(), applet.backing_store()->rect());
 }
 }