diff options
Diffstat (limited to 'src/platform/wayland/internal.h')
| -rw-r--r-- | src/platform/wayland/internal.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/platform/wayland/internal.h b/src/platform/wayland/internal.h index d619dba..c35db7f 100644 --- a/src/platform/wayland/internal.h +++ b/src/platform/wayland/internal.h @@ -23,6 +23,8 @@ #include "protocols/commit-timing-v1-client-protocol.h" #include "protocols/xdg-toplevel-drag-v1-client-protocol.h" #include "protocols/primary-selection-unstable-v1-client-protocol.h" +#include "protocols/relative-pointer-unstable-v1-client-protocol.h" +#include "protocols/pointer-constraints-unstable-v1-client-protocol.h" #include <fcntl.h> #include <limits.h> @@ -131,6 +133,7 @@ struct seat { struct wl_pointer *pointer; struct wl_touch *touch; struct wp_cursor_shape_device_v1 *cursor_shape_dev; + struct zwp_relative_pointer_v1 *relative_pointer; struct wl_surface *cursor_surface; struct wp_viewport *cursor_viewport; struct zwp_tablet_seat_v2 *tablet_seat; @@ -212,6 +215,8 @@ struct wayland_display { struct wl_data_device_manager *data_manager; struct zwp_primary_selection_device_manager_v1 *primary_selection_mgr; struct wp_cursor_shape_manager_v1 *cursor_shape_mgr; + struct zwp_relative_pointer_manager_v1 *relative_pointer_mgr; + struct zwp_pointer_constraints_v1 *pointer_constraints; struct wl_cursor_theme *cursor_theme; const char *cursor_theme_name; struct zwp_tablet_manager_v2 *tablet_mgr; @@ -275,6 +280,9 @@ struct wayland_surface { struct wp_fifo_v1 *fifo; struct wp_commit_timer_v1 *commit_timer; struct wl_callback *frame_cb; + /* Persistent lock held while relative; lock_seat owns the locked wl_pointer. */ + struct zwp_locked_pointer_v1 *pointer_lock; + struct seat *lock_seat; const struct yasl_window_cbs *cbs; void *ud; uint64_t frames_skipped; @@ -316,6 +324,8 @@ struct wayland_surface { bool destroyed; bool opaque; bool want_draw; + bool relative; + bool pointer_locked; }; @@ -388,6 +398,7 @@ int seat_modifiers(const struct seat *s); void surface_init_cursor(struct wayland_display *c); void seat_destroy_tablet(struct seat *s); void seat_pointer_reset(struct seat *s); +void surface_unlock_pointer(struct wayland_surface *w); extern const struct zwp_text_input_v3_listener text_input_listener; void ime_reset(struct wayland_surface *w); |
