1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

WindowServer+MouseSettings: Add ability to configure double-click speed (#5876)

This adds a double-click speed slider control to the Mouse Settings
panel, and value labels for both the movement speed and double-click
speed sliders.

To allow for updating and persisting the configured double-click
speed through the WindowServer, two IPC calls - `SetDoubleClickSpeed`
and `GetDoubleClickSpeed` - have been added.
This commit is contained in:
Daniël van de Burgt 2021-04-02 07:08:18 -07:00 committed by GitHub
parent e55b8712d4
commit a106f852d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 315 additions and 70 deletions

View file

@ -966,6 +966,19 @@ OwnPtr<Messages::WindowServer::GetScrollStepSizeResponse> ClientConnection::hand
{
return make<Messages::WindowServer::GetScrollStepSizeResponse>(Screen::the().scroll_step_size());
}
OwnPtr<Messages::WindowServer::SetDoubleClickSpeedResponse> ClientConnection::handle(const Messages::WindowServer::SetDoubleClickSpeed& message)
{
if (message.speed() < double_click_speed_min || message.speed() > double_click_speed_max) {
did_misbehave("SetDoubleClickSpeed with bad speed");
return {};
}
WindowManager::the().set_double_click_speed(message.speed());
return make<Messages::WindowServer::SetDoubleClickSpeedResponse>();
}
OwnPtr<Messages::WindowServer::GetDoubleClickSpeedResponse> ClientConnection::handle(const Messages::WindowServer::GetDoubleClickSpeed&)
{
return make<Messages::WindowServer::GetDoubleClickSpeedResponse>(WindowManager::the().double_click_speed());
}
void ClientConnection::set_unresponsive(bool unresponsive)
{