mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibIPC+WindowServer+LibGUI: Detect and highlight unresponsive GUI apps
IPC::ClientConnection now tracks the time since the last time we got a message from the client and calls a virtual function on itself after 3 seconds: may_have_become_unresponsive(). Subclasses of ClientConnection can then react to this if they like. We use this mechanism in WindowServer to send out a friendly Ping message to the client. If he doesn't Pong within 1 second, we mark the client as "unresponsive" and recompose all of his windows with a darkened appearance and amended title until he Pongs us. This is a little on the aggressive side and we should figure out a way to wake up less often. Perhaps this could only be done to windows the user is currently interacting with, for example. Anyways, this is pretty cool! :^)
This commit is contained in:
@@ -74,6 +74,7 @@ private:
|
||||
virtual void handle(const Messages::WindowClient::UpdateSystemTheme&) override;
|
||||
virtual void handle(const Messages::WindowClient::WindowStateChanged&) override;
|
||||
virtual void handle(const Messages::WindowClient::DisplayLinkNotification&) override;
|
||||
virtual void handle(const Messages::WindowClient::Ping&) override;
|
||||
|
||||
bool m_display_link_notification_pending { false };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user