WindowServer: Fix loading MainScreen setting from configuration
This commit is contained in:
parent
69c757e92f
commit
857c8850f3
Notes:
sideshowbarker
2024-07-17 21:44:15 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/857c8850f31 Pull-request: https://github.com/SerenityOS/serenity/pull/11599
1 changed files with 2 additions and 2 deletions
|
@ -230,7 +230,7 @@ bool ScreenLayout::normalize()
|
|||
bool ScreenLayout::load_config(const Core::ConfigFile& config_file, String* error_msg)
|
||||
{
|
||||
screens.clear_with_capacity();
|
||||
main_screen_index = config_file.read_num_entry("Screens", "DefaultScreen", 0);
|
||||
main_screen_index = config_file.read_num_entry("Screens", "MainScreen", 0);
|
||||
for (size_t index = 0;; index++) {
|
||||
auto group_name = String::formatted("Screen{}", index);
|
||||
if (!config_file.has_group(group_name))
|
||||
|
@ -249,7 +249,7 @@ bool ScreenLayout::load_config(const Core::ConfigFile& config_file, String* erro
|
|||
|
||||
bool ScreenLayout::save_config(Core::ConfigFile& config_file, bool sync) const
|
||||
{
|
||||
config_file.write_num_entry("Screens", "DefaultScreen", main_screen_index);
|
||||
config_file.write_num_entry("Screens", "MainScreen", main_screen_index);
|
||||
|
||||
size_t index = 0;
|
||||
while (index < screens.size()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue