diff --git a/Servers/WindowServer/WSMenuManager.cpp b/Servers/WindowServer/WSMenuManager.cpp index a2321717b7..5c9088837a 100644 --- a/Servers/WindowServer/WSMenuManager.cpp +++ b/Servers/WindowServer/WSMenuManager.cpp @@ -283,10 +283,8 @@ void WSMenuManager::draw_applet(const WSWindow& applet) void WSMenuManager::invalidate_applet(const WSWindow& applet, const Rect& rect) { - // FIXME: This should only invalidate the applet's own rect, not the whole menubar. - (void)rect; draw_applet(applet); - window().invalidate(); + window().invalidate(rect.translated(applet.rect_in_menubar().location())); } Rect WSMenuManager::menubar_rect() const diff --git a/Servers/WindowServer/WSWindow.cpp b/Servers/WindowServer/WSWindow.cpp index eaf45f4df0..05506a5531 100644 --- a/Servers/WindowServer/WSWindow.cpp +++ b/Servers/WindowServer/WSWindow.cpp @@ -263,6 +263,11 @@ void WSWindow::invalidate() WSWindowManager::the().invalidate(*this); } +void WSWindow::invalidate(const Rect& rect) +{ + WSWindowManager::the().invalidate(*this, rect); +} + bool WSWindow::is_active() const { return WSWindowManager::the().active_window() == this; diff --git a/Servers/WindowServer/WSWindow.h b/Servers/WindowServer/WSWindow.h index 67058a0a14..1957f2b32f 100644 --- a/Servers/WindowServer/WSWindow.h +++ b/Servers/WindowServer/WSWindow.h @@ -115,6 +115,7 @@ public: Size size() const { return m_rect.size(); } void invalidate(); + void invalidate(const Rect&); virtual void event(CEvent&) override;