mirror of
https://github.com/RGBCube/serenity
synced 2025-05-26 01:45:06 +00:00
WindowServer: Move configuration file into /etc/WindowServer
This is in preparation for running WindowServer as a separate user.
This commit is contained in:
parent
1176167944
commit
0415db30c6
5 changed files with 6 additions and 9 deletions
|
@ -47,7 +47,7 @@
|
||||||
#include <Servers/WindowServer/WindowManager.h>
|
#include <Servers/WindowServer/WindowManager.h>
|
||||||
|
|
||||||
DisplayPropertiesWidget::DisplayPropertiesWidget()
|
DisplayPropertiesWidget::DisplayPropertiesWidget()
|
||||||
: m_wm_config(Core::ConfigFile::get_for_app("WindowManager"))
|
: m_wm_config(Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini"))
|
||||||
{
|
{
|
||||||
create_resolution_list();
|
create_resolution_list();
|
||||||
create_wallpaper_list();
|
create_wallpaper_list();
|
||||||
|
|
|
@ -38,7 +38,7 @@ AppletManager::AppletManager()
|
||||||
{
|
{
|
||||||
s_the = this;
|
s_the = this;
|
||||||
|
|
||||||
auto wm_config = Core::ConfigFile::get_for_app("WindowManager");
|
auto wm_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
|
||||||
auto order = wm_config->read_entry("Applet", "Order");
|
auto order = wm_config->read_entry("Applet", "Order");
|
||||||
order_vector = order.split(',');
|
order_vector = order.split(',');
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ NonnullRefPtr<Cursor> WindowManager::get_cursor(const String& name)
|
||||||
|
|
||||||
void WindowManager::reload_config(bool set_screen)
|
void WindowManager::reload_config(bool set_screen)
|
||||||
{
|
{
|
||||||
m_wm_config = Core::ConfigFile::get_for_app("WindowManager");
|
m_wm_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
|
||||||
|
|
||||||
m_double_click_speed = m_wm_config->read_num_entry("Input", "DoubleClickSpeed", 250);
|
m_double_click_speed = m_wm_config->read_num_entry("Input", "DoubleClickSpeed", 250);
|
||||||
|
|
||||||
|
@ -1241,7 +1241,7 @@ void WindowManager::update_theme(String theme_path, String theme_name)
|
||||||
}
|
}
|
||||||
return IterationDecision::Continue;
|
return IterationDecision::Continue;
|
||||||
});
|
});
|
||||||
auto wm_config = Core::ConfigFile::get_for_app("WindowManager");
|
auto wm_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
|
||||||
wm_config->write_entry("Theme", "Name", theme_name);
|
wm_config->write_entry("Theme", "Name", theme_name);
|
||||||
wm_config->sync();
|
wm_config->sync();
|
||||||
invalidate();
|
invalidate();
|
||||||
|
|
|
@ -58,10 +58,7 @@ int main(int, char**)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: WindowServer should obviously not hardcode this.
|
if (unveil("/etc/WindowServer/WindowServer.ini", "rwc") < 0) {
|
||||||
// Instead, we should have a ConfigServer or similar that allows programs
|
|
||||||
// to get/set user settings over IPC without giving them access to any files.
|
|
||||||
if (unveil("/home/anon/WindowManager.ini", "rwc") < 0) {
|
|
||||||
perror("unveil");
|
perror("unveil");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +78,7 @@ int main(int, char**)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto wm_config = Core::ConfigFile::get_for_app("WindowManager");
|
auto wm_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
|
||||||
auto theme_name = wm_config->read_entry("Theme", "Name", "Default");
|
auto theme_name = wm_config->read_entry("Theme", "Name", "Default");
|
||||||
|
|
||||||
auto theme = Gfx::load_system_theme(String::format("/res/themes/%s.ini", theme_name.characters()));
|
auto theme = Gfx::load_system_theme(String::format("/res/themes/%s.ini", theme_name.characters()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue