summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Services/WindowServer/Window.cpp3
-rw-r--r--Userland/Services/WindowServer/WindowFrame.cpp5
-rw-r--r--Userland/Services/WindowServer/WindowFrame.h1
3 files changed, 7 insertions, 2 deletions
diff --git a/Userland/Services/WindowServer/Window.cpp b/Userland/Services/WindowServer/Window.cpp
index 601f09c703..da3366e8a7 100644
--- a/Userland/Services/WindowServer/Window.cpp
+++ b/Userland/Services/WindowServer/Window.cpp
@@ -1264,8 +1264,7 @@ void Window::invalidate_menubar()
{
if (!m_should_show_menubar || !menubar())
return;
- // FIXME: This invalidates way more than the menubar!
- frame().invalidate();
+ frame().invalidate_menubar();
}
void Window::set_modified(bool modified)
diff --git a/Userland/Services/WindowServer/WindowFrame.cpp b/Userland/Services/WindowServer/WindowFrame.cpp
index 8b72964733..e670b5ebda 100644
--- a/Userland/Services/WindowServer/WindowFrame.cpp
+++ b/Userland/Services/WindowServer/WindowFrame.cpp
@@ -585,6 +585,11 @@ void WindowFrame::invalidate()
m_window.invalidate(true, true);
}
+void WindowFrame::invalidate_menubar()
+{
+ invalidate(menubar_rect());
+}
+
void WindowFrame::invalidate(Gfx::IntRect relative_rect)
{
auto frame_rect = rect();
diff --git a/Userland/Services/WindowServer/WindowFrame.h b/Userland/Services/WindowServer/WindowFrame.h
index 03ed6ecb01..677e503cb0 100644
--- a/Userland/Services/WindowServer/WindowFrame.h
+++ b/Userland/Services/WindowServer/WindowFrame.h
@@ -70,6 +70,7 @@ public:
void window_rect_changed(const Gfx::IntRect& old_rect, const Gfx::IntRect& new_rect);
void invalidate_titlebar();
+ void invalidate_menubar();
void invalidate(Gfx::IntRect relative_rect);
void invalidate();