From d2e732c507c53ddca4c60a7aff650971545d7520 Mon Sep 17 00:00:00 2001 From: Fabrice Date: Tue, 10 Feb 2026 08:44:50 +0100 Subject: getting eventfd --- src/wlstate.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/wlstate.cc') diff --git a/src/wlstate.cc b/src/wlstate.cc index c7c1066..9232843 100644 --- a/src/wlstate.cc +++ b/src/wlstate.cc @@ -64,6 +64,12 @@ bool wayc_wl_state_init(struct wl_state_s *state) { if (display == NULL) return false; + i32 eventfd = wl_display_get_fd(display); + if (eventfd == -1) { + wl_display_disconnect(display); + return false; + } + wl_registry_t registry = wl_display_get_registry(display); if (registry == NULL) { wl_display_disconnect(display); @@ -75,6 +81,8 @@ bool wayc_wl_state_init(struct wl_state_s *state) { state->display = display; state->registry = registry; + state->eventfd = eventfd; + return true; } -- cgit v1.2.3