summaryrefslogtreecommitdiff
path: root/Services/WindowServer
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-13 13:47:01 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-13 13:47:01 +0200
commit4ab1b0b43681323e5d0e6b0572781ff70ab74a15 (patch)
tree8a94c5252b0957902f13a7f7031bc404765ed46f /Services/WindowServer
parent47df0cbbc82778beaa12f4b5f84f924c32ce2c60 (diff)
downloadserenity-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/WindowServer')
-rw-r--r--Services/WindowServer/ClientConnection.cpp5
-rw-r--r--Services/WindowServer/ClientConnection.h1
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);