1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:57:35 +00:00

LibCore: Make LocalServer::take_over_from_system_server() return ErrorOr

This allows us to use TRY() or MUST() when calling it.
This commit is contained in:
Andreas Kling 2021-12-06 16:27:57 +01:00
parent 229a45ab14
commit 81047d8f9c
13 changed files with 41 additions and 53 deletions

View file

@ -25,10 +25,8 @@ EventLoop::EventLoop()
m_keyboard_fd = open("/dev/keyboard0", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
m_mouse_fd = open("/dev/mouse0", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
bool ok = m_window_server->take_over_from_system_server("/tmp/portal/window");
VERIFY(ok);
ok = m_wm_server->take_over_from_system_server("/tmp/portal/wm");
VERIFY(ok);
MUST(m_window_server->take_over_from_system_server("/tmp/portal/window"));
MUST(m_wm_server->take_over_from_system_server("/tmp/portal/wm"));
m_window_server->on_accept = [&](auto client_socket) {
static int s_next_client_id = 0;