diff options
| author | Ikalco <73481042+ikalco@users.noreply.github.com> | 2024-12-01 11:14:35 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-01 17:14:35 +0000 |
| commit | 6d7544458d0fafcae410c1978a0cabce2fb4a346 (patch) | |
| tree | 77bac5cd967326e3f643cbb91fc7e7ae910d401c /src/xwayland/Server.cpp | |
| parent | d26439a0fe5594fb26d5a3c01571f9490a9a2d2c (diff) | |
cleanup: use doLater instead of adding idle event handlers (#8624)
Diffstat (limited to 'src/xwayland/Server.cpp')
| -rw-r--r-- | src/xwayland/Server.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/xwayland/Server.cpp b/src/xwayland/Server.cpp index f356af18..390ce1f6 100644 --- a/src/xwayland/Server.cpp +++ b/src/xwayland/Server.cpp @@ -176,11 +176,6 @@ static bool openSockets(std::array<int, 2>& sockets, int display) { return true; } -static void startServer(void* data) { - if (!g_pXWayland->pServer->start()) - Debug::log(ERR, "The XWayland server could not start! XWayland will not work..."); -} - static int xwaylandReady(int fd, uint32_t mask, void* data) { return g_pXWayland->pServer->ready(fd, mask); } @@ -308,9 +303,10 @@ bool CXWaylandServer::create() { setenv("DISPLAY", displayName.c_str(), true); - // TODO: lazy mode - - idleSource = wl_event_loop_add_idle(g_pCompositor->m_sWLEventLoop, ::startServer, nullptr); + g_pEventLoopManager->doLater([this]() { + if (!start()) + Debug::log(ERR, "The XWayland server could not start! XWayland will not work..."); + }); return true; } |
