1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:17:35 +00:00

WindowManager: Basic support for system keymap switching

This commit is contained in:
Timur Sultanov 2022-01-18 16:00:49 +03:00 committed by Andreas Kling
parent 181d1e2dd6
commit 68a01f0e27
6 changed files with 150 additions and 3 deletions

View file

@ -21,17 +21,19 @@
ErrorOr<int> serenity_main(Main::Arguments)
{
TRY(Core::System::pledge("stdio video thread sendfd recvfd accept rpath wpath cpath unix proc sigaction"));
TRY(Core::System::pledge("stdio video thread sendfd recvfd accept rpath wpath cpath unix proc sigaction exec"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp", "cw"));
TRY(Core::System::unveil("/etc/WindowServer.ini", "rwc"));
TRY(Core::System::unveil("/dev", "rw"));
TRY(Core::System::unveil("/bin/keymap", "x"));
TRY(Core::System::unveil("/proc/keymap", "r"));
struct sigaction act = {};
act.sa_flags = SA_NOCLDWAIT;
act.sa_handler = SIG_IGN;
TRY(Core::System::sigaction(SIGCHLD, &act, nullptr));
TRY(Core::System::pledge("stdio video thread sendfd recvfd accept rpath wpath cpath unix proc"));
TRY(Core::System::pledge("stdio video thread sendfd recvfd accept rpath wpath cpath unix proc exec"));
auto wm_config = Core::ConfigFile::open("/etc/WindowServer.ini");
auto theme_name = wm_config->read_entry("Theme", "Name", "Default");
@ -49,7 +51,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
WindowServer::EventLoop loop;
TRY(Core::System::pledge("stdio video thread sendfd recvfd accept rpath wpath cpath proc"));
TRY(Core::System::pledge("stdio video thread sendfd recvfd accept rpath wpath cpath proc exec"));
// First check which screens are explicitly configured
{