summaryrefslogtreecommitdiff
path: root/src/xwayland/Server.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2024-12-03 21:15:25 +0000
committervaxerski <vaxry@vaxry.net>2024-12-03 21:15:25 +0000
commitf6ac755cf76750b8ee53389c54ef653590462c1c (patch)
treea216ea77acaf1e1165475bac00d70b28c2e55895 /src/xwayland/Server.cpp
parent320144ae7288fe23686935ebb235d9fe0c900862 (diff)
cleanup: Revert use doLater instead of adding idle event handlers (#8624)
This reverts commit 6d7544458d0fafcae410c1978a0cabce2fb4a346.
Diffstat (limited to 'src/xwayland/Server.cpp')
-rw-r--r--src/xwayland/Server.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/xwayland/Server.cpp b/src/xwayland/Server.cpp
index 390ce1f6..f356af18 100644
--- a/src/xwayland/Server.cpp
+++ b/src/xwayland/Server.cpp
@@ -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;
}