diff --git a/Userland/Services/WindowServer/Window.cpp b/Userland/Services/WindowServer/Window.cpp index b5182a47b1..5e7946ebe8 100644 --- a/Userland/Services/WindowServer/Window.cpp +++ b/Userland/Services/WindowServer/Window.cpp @@ -997,6 +997,7 @@ void Window::set_modified(bool modified) return; m_modified = modified; + WindowManager::the().notify_modified_changed(*this); frame().set_button_icons(); frame().invalidate_titlebar(); } diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index 668ebc5675..dd729f132e 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -375,6 +375,14 @@ static bool window_type_has_title(WindowType type) return type == WindowType::Normal || type == WindowType::ToolWindow; } +void WindowManager::notify_modified_changed(Window& window) +{ + if (m_switcher.is_visible()) + m_switcher.refresh(); + + tell_wms_window_state_changed(window); +} + void WindowManager::notify_title_changed(Window& window) { if (!window_type_has_title(window.type())) diff --git a/Userland/Services/WindowServer/WindowManager.h b/Userland/Services/WindowServer/WindowManager.h index 5adc22e358..58d5ca5ce0 100644 --- a/Userland/Services/WindowServer/WindowManager.h +++ b/Userland/Services/WindowServer/WindowManager.h @@ -78,6 +78,7 @@ public: void notify_opacity_changed(Window&); void notify_occlusion_state_changed(Window&); void notify_progress_changed(Window&); + void notify_modified_changed(Window&); Gfx::IntRect maximized_window_rect(const Window&) const;