WindowServer: Use correct config group for workspace settings

WindowServer.ini already contained the correct pluralized group by
default, but was left unused by a typo.
This commit is contained in:
thankyouverycool 2022-08-16 07:59:45 -04:00 committed by Andreas Kling
parent 71a437b512
commit 7c1995993f
Notes: sideshowbarker 2024-07-17 08:12:23 +09:00

View file

@ -72,8 +72,8 @@ void WindowManager::reload_config()
{
m_config = Core::ConfigFile::open("/etc/WindowServer.ini", Core::ConfigFile::AllowWriting::Yes).release_value_but_fixme_should_propagate_errors();
unsigned workspace_rows = (unsigned)m_config->read_num_entry("Workspace", "Rows", default_window_stack_rows);
unsigned workspace_columns = (unsigned)m_config->read_num_entry("Workspace", "Columns", default_window_stack_columns);
unsigned workspace_rows = (unsigned)m_config->read_num_entry("Workspaces", "Rows", default_window_stack_rows);
unsigned workspace_columns = (unsigned)m_config->read_num_entry("Workspaces", "Columns", default_window_stack_columns);
if (workspace_rows == 0 || workspace_columns == 0 || workspace_rows > max_window_stack_rows || workspace_columns > max_window_stack_columns) {
workspace_rows = default_window_stack_rows;
workspace_columns = default_window_stack_columns;
@ -254,8 +254,8 @@ bool WindowManager::apply_workspace_settings(unsigned rows, unsigned columns, bo
}
if (save) {
m_config->write_num_entry("Workspace", "Rows", window_stack_rows());
m_config->write_num_entry("Workspace", "Columns", window_stack_columns());
m_config->write_num_entry("Workspaces", "Rows", window_stack_rows());
m_config->write_num_entry("Workspaces", "Columns", window_stack_columns());
return !m_config->sync().is_error();
}
return true;