mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:07:35 +00:00
WindowManager: Basic support for system keymap switching
This commit is contained in:
parent
181d1e2dd6
commit
68a01f0e27
6 changed files with 150 additions and 3 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue