diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-13 13:47:01 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-13 13:47:01 +0200 |
commit | 4ab1b0b43681323e5d0e6b0572781ff70ab74a15 (patch) | |
tree | 8a94c5252b0957902f13a7f7031bc404765ed46f /Services | |
parent | 47df0cbbc82778beaa12f4b5f84f924c32ce2c60 (diff) | |
download | serenity-4ab1b0b43681323e5d0e6b0572781ff70ab74a15.zip |
LibIPC: Only start responsiveness timer after sending client a message
Instead of always running the responsiveness timer for IPC clients,
we now only start it after sending a message. This avoids waking up
otherwise idle clients to do ping/pong busywork.
Diffstat (limited to 'Services')
-rw-r--r-- | Services/WindowServer/ClientConnection.cpp | 5 | ||||
-rw-r--r-- | Services/WindowServer/ClientConnection.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Services/WindowServer/ClientConnection.cpp b/Services/WindowServer/ClientConnection.cpp index dff7ae8d51..56353cda36 100644 --- a/Services/WindowServer/ClientConnection.cpp +++ b/Services/WindowServer/ClientConnection.cpp @@ -844,4 +844,9 @@ void ClientConnection::may_have_become_unresponsive() }); } +void ClientConnection::did_become_responsive() +{ + set_unresponsive(false); +} + } diff --git a/Services/WindowServer/ClientConnection.h b/Services/WindowServer/ClientConnection.h index b662d31110..ea4d822d55 100644 --- a/Services/WindowServer/ClientConnection.h +++ b/Services/WindowServer/ClientConnection.h @@ -89,6 +89,7 @@ private: // ^ClientConnection virtual void die() override; virtual void may_have_become_unresponsive() override; + virtual void did_become_responsive() override; void set_unresponsive(bool); void destroy_window(Window&, Vector<i32>& destroyed_window_ids); |