diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 08:44:50 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 08:44:50 +0100 |
| commit | d2e732c507c53ddca4c60a7aff650971545d7520 (patch) | |
| tree | 7c456252411e55dd2b33dc0687631cc0a4863393 /src | |
| parent | 527f8ebfb3f1a68de09ba61104bb74172d089769 (diff) | |
getting eventfd
Diffstat (limited to 'src')
| -rw-r--r-- | src/wlstate.cc | 8 | ||||
| -rw-r--r-- | src/wlstate.h | 1 |
2 files changed, 9 insertions, 0 deletions
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; } diff --git a/src/wlstate.h b/src/wlstate.h index 20a1e75..e4757f6 100644 --- a/src/wlstate.h +++ b/src/wlstate.h @@ -7,6 +7,7 @@ struct wl_state_s { wl_registry_t registry; wl_compositor_t compositor; xdg_wm_base_t wm_base; + u32 eventfd; }; bool wayc_wl_state_init(struct wl_state_s *state); |
