mirror of
https://github.com/RGBCube/serenity
synced 2025-06-19 19:22:09 +00:00
WindowServer: Don't repaint entire menubar on applet update
This commit is contained in:
parent
8fd7f3d9fa
commit
00d26457c5
3 changed files with 7 additions and 3 deletions
|
@ -283,10 +283,8 @@ void WSMenuManager::draw_applet(const WSWindow& applet)
|
||||||
|
|
||||||
void WSMenuManager::invalidate_applet(const WSWindow& applet, const Rect& rect)
|
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);
|
draw_applet(applet);
|
||||||
window().invalidate();
|
window().invalidate(rect.translated(applet.rect_in_menubar().location()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect WSMenuManager::menubar_rect() const
|
Rect WSMenuManager::menubar_rect() const
|
||||||
|
|
|
@ -263,6 +263,11 @@ void WSWindow::invalidate()
|
||||||
WSWindowManager::the().invalidate(*this);
|
WSWindowManager::the().invalidate(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WSWindow::invalidate(const Rect& rect)
|
||||||
|
{
|
||||||
|
WSWindowManager::the().invalidate(*this, rect);
|
||||||
|
}
|
||||||
|
|
||||||
bool WSWindow::is_active() const
|
bool WSWindow::is_active() const
|
||||||
{
|
{
|
||||||
return WSWindowManager::the().active_window() == this;
|
return WSWindowManager::the().active_window() == this;
|
||||||
|
|
|
@ -115,6 +115,7 @@ public:
|
||||||
Size size() const { return m_rect.size(); }
|
Size size() const { return m_rect.size(); }
|
||||||
|
|
||||||
void invalidate();
|
void invalidate();
|
||||||
|
void invalidate(const Rect&);
|
||||||
|
|
||||||
virtual void event(CEvent&) override;
|
virtual void event(CEvent&) override;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue