mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 06:37:52 +00:00
WindowServer: Added configurable mouse acceleration and scroll length
The settings are also saved to the config file to survive reboots.
This commit is contained in:
committed by
Andreas Kling
parent
0c51778510
commit
db409db4e9
@@ -163,6 +163,22 @@ Gfx::IntSize WindowManager::resolution() const
|
||||
return Screen::the().size();
|
||||
}
|
||||
|
||||
void WindowManager::set_acceleration_factor(double factor)
|
||||
{
|
||||
Screen::the().set_acceleration_factor(factor);
|
||||
dbgln("Saving acceleration factor {} to config file at {}", factor, m_config->file_name());
|
||||
m_config->write_entry("Mouse", "AccelerationFactor", String::formatted("{}", factor));
|
||||
m_config->sync();
|
||||
}
|
||||
|
||||
void WindowManager::set_scroll_step_size(unsigned step_size)
|
||||
{
|
||||
Screen::the().set_scroll_step_size(step_size);
|
||||
dbgln("Saving scroll step size {} to config file at {}", step_size, m_config->file_name());
|
||||
m_config->write_entry("Mouse", "ScrollStepSize", String::number(step_size));
|
||||
m_config->sync();
|
||||
}
|
||||
|
||||
void WindowManager::add_window(Window& window)
|
||||
{
|
||||
bool is_first_window = m_windows_in_order.is_empty();
|
||||
|
||||
Reference in New Issue
Block a user