WindowServer: Notify WM clients when a window's modified state changes

Also update the window switcher for good measure. The window switcher
doesn't visualize this information at the moment, but we generally do
this when any window state changes.
This commit is contained in:
Andreas Kling 2021-05-09 23:56:24 +02:00
parent a47d576e94
commit 1f24ab91f2
Notes: sideshowbarker 2024-07-18 18:24:26 +09:00
3 changed files with 10 additions and 0 deletions

View file

@ -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();
}

View file

@ -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()))

View file

@ -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;