From 5b5eb5a16969afc4862fac387940818efc26780a Mon Sep 17 00:00:00 2001 From: Fabrice Date: Tue, 10 Feb 2026 07:41:11 +0100 Subject: how are we going to do this --- src/wlstate.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/wlstate.cc (limited to 'src/wlstate.cc') diff --git a/src/wlstate.cc b/src/wlstate.cc new file mode 100644 index 0000000..e78aad1 --- /dev/null +++ b/src/wlstate.cc @@ -0,0 +1,19 @@ +#include "wlstate.h" +#include "utils.h" + +bool wayc_wl_state_init(struct wl_state_s *state) { + wayc_assert(state != NULL); + + wl_display_t display = wl_display_connect(NULL); + if (display == NULL) + return false; + + state->display = display; + return true; +} + +void wayc_wl_state_deinit(struct wl_state_s *state) { + wayc_assert(state != NULL); + + wl_display_disconnect(state->display); +} -- cgit v1.2.3