mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-22 23:43:50 -07:00
cleanup: use doLater instead of adding idle event handlers (#8624)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user