WindowServer+LibGUI: Add per-window progress

Each window now has an associated progress integer that can be updated
via the SetWindowProgress IPC call.

This can be used by clients to indicate the progress of ongoing tasks.
Any number in the range 0 through 100 indicate a progress percentage.
Any other number means "no progress"
This commit is contained in:
Andreas Kling 2020-05-30 22:08:26 +02:00
parent 8449f0a15b
commit 1d6ec51bee
Notes: sideshowbarker 2024-07-19 05:56:02 +09:00
12 changed files with 47 additions and 4 deletions

View file

@ -266,7 +266,7 @@ void WindowServerConnection::handle(const Messages::WindowClient::MenuItemActiva
void WindowServerConnection::handle(const Messages::WindowClient::WM_WindowStateChanged& message)
{
if (auto* window = Window::from_window_id(message.wm_id()))
Core::EventLoop::current().post_event(*window, make<WMWindowStateChangedEvent>(message.client_id(), message.window_id(), message.title(), message.rect(), message.is_active(), static_cast<WindowType>(message.window_type()), message.is_minimized(), message.is_frameless()));
Core::EventLoop::current().post_event(*window, make<WMWindowStateChangedEvent>(message.client_id(), message.window_id(), message.title(), message.rect(), message.is_active(), static_cast<WindowType>(message.window_type()), message.is_minimized(), message.is_frameless(), message.progress()));
}
void WindowServerConnection::handle(const Messages::WindowClient::WM_WindowRectChanged& message)