1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00

WindowServer: Only load /etc/WindowServer.ini once and keep it loaded

Instead of opening and reparsing WindowServer.ini at random occasions,
just keep the file open after loading it in serenity_main().

This avoids a bunch of unnecessary work, and also fixes an issue where
WindowManager::m_config might re-write stale values to disk.
This commit is contained in:
Andreas Kling 2023-01-02 17:13:39 +01:00
parent 481c0419ba
commit f4168be700
6 changed files with 82 additions and 91 deletions

View file

@ -20,8 +20,7 @@ AppletManager::AppletManager()
{
s_the = this;
auto wm_config = Core::ConfigFile::open("/etc/WindowServer.ini").release_value_but_fixme_should_propagate_errors();
auto order = wm_config->read_entry("Applet", "Order");
auto order = g_config->read_entry("Applet", "Order");
order_vector = order.split(',');
}