diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2025-10-11 02:30:18 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2025-10-11 02:30:18 -0400 |
| commit | f43ec9b27ebe37b799709985f5587e29ec8ef88b (patch) | |
| tree | cfae61b2e1ffc3658bdf67450666f5f0c89b2b92 /pointer.c | |
| parent | ba3a68a4f73f6653b1e1b095abc08234dedc504d (diff) | |
refactor to .h files
Diffstat (limited to 'pointer.c')
| -rw-r--r-- | pointer.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,7 +1,13 @@ -#include "./state.h" -#include "cursor-shape-v1.h" -#define CLAMP(x, min, max) (x > max ? max : (x < min ? min : x)) +#include "state.h" +struct wl_pointer_listener pointer_listener; + +void setup_pointer(client_state* state) { + state->pointer = wl_seat_get_pointer(state->seat); + state->cursor_shape_device = wp_cursor_shape_manager_v1_get_pointer( + state->cursor_shape_manager, state->pointer); + wl_pointer_add_listener(state->pointer, &pointer_listener, state); +} void enter(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t fixed_surface_x, wl_fixed_t fixed_surface_y) { |
