From f23baade916e844b6b6c9714e6b5d81020f6ba57 Mon Sep 17 00:00:00 2001 From: Riley Beckett Date: Fri, 10 Oct 2025 20:31:37 -0400 Subject: minimal layer surface code --- pointer.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pointer.c (limited to 'pointer.c') diff --git a/pointer.c b/pointer.c new file mode 100644 index 0000000..8acab04 --- /dev/null +++ b/pointer.c @@ -0,0 +1,36 @@ +#include "./state.h" +#include "cursor-shape-v1.h" +#define CLAMP(x, min, max) (x > max ? max : (x < min ? min : x)) + + +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) { + client_state* state = data; + wp_cursor_shape_device_v1_set_shape( + state->cursor_shape_device, serial, + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT); +} + +void leave(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface) { +} + +void motion(void *data, struct wl_pointer *pointer, uint32_t time, + wl_fixed_t fixed_surface_x, wl_fixed_t fixed_surface_y) { +} + +void button(void *data, struct wl_pointer *pointer, uint32_t serial, + uint32_t time, uint32_t button, uint32_t button_state) { +} + +void axis(void *data, struct wl_pointer *pointer, uint32_t time, + uint32_t axis, wl_fixed_t fixed_value) { +} + +struct wl_pointer_listener pointer_listener = { + .enter = enter, + .leave = leave, + .motion = motion, + .button = button, + .axis = axis +}; + -- cgit v1.2.3