summaryrefslogtreecommitdiff
path: root/src/wlstate.cc
blob: e78aad1878fdb30c6247eaa1379cd32cf8078569 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
}