mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +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:
parent
e55b8712d4
commit
a106f852d3
10 changed files with 315 additions and 70 deletions
|
@ -171,6 +171,20 @@ void WindowManager::set_scroll_step_size(unsigned step_size)
|
|||
m_config->sync();
|
||||
}
|
||||
|
||||
void WindowManager::set_double_click_speed(int speed)
|
||||
{
|
||||
VERIFY(speed >= double_click_speed_min && speed <= double_click_speed_max);
|
||||
m_double_click_speed = speed;
|
||||
dbgln("Saving double-click speed {} to config file at {}", speed, m_config->file_name());
|
||||
m_config->write_entry("Input", "DoubleClickSpeed", String::number(speed));
|
||||
m_config->sync();
|
||||
}
|
||||
|
||||
int WindowManager::double_click_speed() const
|
||||
{
|
||||
return m_double_click_speed;
|
||||
}
|
||||
|
||||
int WindowManager::scale_factor() const
|
||||
{
|
||||
return Screen::the().scale_factor();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue