pointer: release pressed buttons on destroy

This commit is contained in:
Kirill Primak 2024-08-14 20:23:45 +03:00 committed by Alexander Orzechowski
parent c752270be7
commit 56d69320c7
8 changed files with 38 additions and 6 deletions

View file

@ -19,4 +19,7 @@ void wlr_pointer_init(struct wlr_pointer *pointer,
const struct wlr_pointer_impl *impl, const char *name);
void wlr_pointer_finish(struct wlr_pointer *pointer);
void wlr_pointer_notify_button(struct wlr_pointer *pointer,
struct wlr_pointer_button_event *event);
#endif

View file

@ -14,6 +14,8 @@
#include <wayland-server-protocol.h>
#include <wlr/types/wlr_input_device.h>
#define WLR_POINTER_BUTTONS_CAP 16
struct wlr_pointer_impl;
struct wlr_pointer {
@ -23,6 +25,9 @@ struct wlr_pointer {
char *output_name;
uint32_t buttons[WLR_POINTER_BUTTONS_CAP];
size_t button_count;
struct {
struct wl_signal motion; // struct wlr_pointer_motion_event
struct wl_signal motion_absolute; // struct wlr_pointer_motion_absolute_event

View file

@ -170,8 +170,6 @@ struct wlr_seat_pointer_grab {
void *data;
};
#define WLR_POINTER_BUTTONS_CAP 16
struct wlr_seat_pointer_button {
uint32_t button;
size_t n_pressed;