cleanup: Revert use doLater instead of adding idle event handlers (#8624)

This reverts commit 6d7544458d.
This commit is contained in:
vaxerski
2024-12-03 21:15:25 +00:00
parent 320144ae72
commit f6ac755cf7
5 changed files with 39 additions and 32 deletions

View File

@@ -176,6 +176,11 @@ 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);
}
@@ -303,10 +308,9 @@ bool CXWaylandServer::create() {
setenv("DISPLAY", displayName.c_str(), true);
g_pEventLoopManager->doLater([this]() {
if (!start())
Debug::log(ERR, "The XWayland server could not start! XWayland will not work...");
});
// TODO: lazy mode
idleSource = wl_event_loop_add_idle(g_pCompositor->m_sWLEventLoop, ::startServer, nullptr);
return true;
}