From 0a0ef8852ab3f4b82ae1f8c7bf3dc8742d35f518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 10 Jul 2020 18:20:29 +0200 Subject: [PATCH] bar/wayland: move seat.pointer.pointer -> seat.wl_pointer --- bar/wayland.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bar/wayland.c b/bar/wayland.c index 511109c..b1dc8b7 100644 --- a/bar/wayland.c +++ b/bar/wayland.c @@ -62,8 +62,8 @@ struct seat { char *name; uint32_t id; + struct wl_pointer *wl_pointer; struct { - struct wl_pointer *pointer; uint32_t serial; int x; @@ -123,8 +123,8 @@ seat_destroy(struct seat *seat) if (seat->pointer.theme != NULL) wl_cursor_theme_destroy(seat->pointer.theme); - if (seat->pointer.pointer != NULL) - wl_pointer_destroy(seat->pointer.pointer); + if (seat->wl_pointer != NULL) + wl_pointer_destroy(seat->wl_pointer); if (seat->pointer.surface != NULL) wl_surface_destroy(seat->pointer.surface); if (seat->seat != NULL) @@ -162,7 +162,7 @@ update_cursor_surface(struct wayland_backend *backend, struct seat *seat) seat->pointer.surface, wl_cursor_image_get_buffer(image), 0, 0); wl_pointer_set_cursor( - seat->pointer.pointer, seat->pointer.serial, + seat->wl_pointer, seat->pointer.serial, seat->pointer.surface, image->hotspot_x / scale, image->hotspot_y / scale); @@ -318,24 +318,24 @@ seat_handle_capabilities(void *data, struct wl_seat *wl_seat, struct wayland_backend *backend = seat->backend; if (caps & WL_SEAT_CAPABILITY_POINTER) { - if (seat->pointer.pointer == NULL) { + if (seat->wl_pointer == NULL) { - seat->pointer.pointer = wl_seat_get_pointer(wl_seat); + seat->wl_pointer = wl_seat_get_pointer(wl_seat); seat->pointer.surface = wl_compositor_create_surface(backend->compositor); seat->pointer.cursor = NULL; wl_pointer_add_listener( - seat->pointer.pointer, &pointer_listener, seat); + seat->wl_pointer, &pointer_listener, seat); } } else { - if (seat->pointer.pointer != NULL) - wl_pointer_release(seat->pointer.pointer); + if (seat->wl_pointer != NULL) + wl_pointer_release(seat->wl_pointer); if (seat->pointer.theme != NULL) wl_cursor_theme_destroy(seat->pointer.theme); if (seat->pointer.surface != NULL) wl_surface_destroy(seat->pointer.surface); - seat->pointer.pointer = NULL; + seat->wl_pointer = NULL; seat->pointer.cursor = NULL; seat->pointer.theme = NULL; seat->pointer.surface = NULL;