diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2025-10-11 11:23:17 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2025-10-11 11:23:17 -0400 |
| commit | 502ffec5198dd0dbd87f8d88ff07f95f241a24f8 (patch) | |
| tree | 0351c20bf22d0b6ad55994d0ef4867c3518fdc0b /registry.c | |
| parent | a4e1bdbf38ac1e1f293a778e74f4773e356246aa (diff) | |
clean up and separate from registry
Diffstat (limited to 'registry.c')
| -rw-r--r-- | registry.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2,7 +2,6 @@ #include <string.h> #include "./state.h" -#include "wayland.h" struct wl_registry_listener registry_listener; @@ -11,6 +10,9 @@ void setup_registry(client_state* state) { wl_registry_add_listener(state->registry, ®istry_listener, state); wl_display_roundtrip(state->display); } + +// listeners + void global(void *data, struct wl_registry *wl_registry, uint32_t name, const char *interface, uint32_t version) { client_state* state = data; @@ -20,7 +22,7 @@ void global(void *data, struct wl_registry *wl_registry, uint32_t name, const ch state->compositor = wl_registry_bind(wl_registry, name, &wl_compositor_interface, 1); } else if (!strcmp(interface, wl_seat_interface.name)) { - setup_seat(state, name); + state->seat = wl_registry_bind(state->registry, name, &wl_seat_interface, 1); } else if (!strcmp(interface, zwlr_layer_shell_v1_interface.name)) { state->layer_shell = wl_registry_bind(wl_registry, name, &zwlr_layer_shell_v1_interface, version); |
