mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-27 01:41:02 -05:00
Add pointer constraint functionality.
This commit is contained in:
parent
8a009212bc
commit
3f72f1e9bc
5 changed files with 233 additions and 6 deletions
17
seat.h
17
seat.h
|
|
@ -5,6 +5,7 @@
|
|||
#include <wlr/types/wlr_cursor.h>
|
||||
#include <wlr/types/wlr_data_device.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/types/wlr_pointer_constraints_v1.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
|
||||
|
|
@ -48,6 +49,20 @@ struct cg_seat {
|
|||
struct wl_listener request_set_cursor;
|
||||
struct wl_listener request_set_selection;
|
||||
struct wl_listener request_set_primary_selection;
|
||||
|
||||
struct wl_listener constraint_commit;
|
||||
struct wlr_pointer_constraint_v1 *active_constraint;
|
||||
pixman_region32_t confine; // invalid if active_constraint == NULL
|
||||
bool active_confine_requires_warp;
|
||||
};
|
||||
|
||||
struct cg_pointer_constraint {
|
||||
struct cg_seat *seat;
|
||||
|
||||
struct wlr_pointer_constraint_v1 *constraint;
|
||||
|
||||
struct wl_listener set_region;
|
||||
struct wl_listener destroy;
|
||||
};
|
||||
|
||||
struct cg_keyboard_group {
|
||||
|
|
@ -93,4 +108,6 @@ struct cg_view *seat_get_focus(struct cg_seat *seat);
|
|||
void seat_set_focus(struct cg_seat *seat, struct cg_view *view);
|
||||
void seat_center_cursor(struct cg_seat *seat);
|
||||
|
||||
void handle_pointer_constraint(struct wl_listener *listener, void *data);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue