diff options
author | emersion <contact@emersion.fr> | 2018-09-27 10:25:59 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-09-27 10:25:59 +0200 |
commit | dac4f8e19ffd19dfeee2c65270476a52c13d0f8f (patch) | |
tree | 2d268b14381f282afc58e1722e5ad61d1c19afda /include/wlr | |
parent | 31cc2fa4f9eae8f6c884b35c500aef4225b3f9ef (diff) |
pointer-constraints: refactoring
* Rename the constraint_create signal to new_constraint for
consistency
* Move the constraint_destroy signal to the constraint itself
* Use rotate_child_position instead of duplicating logic
* Fix inert constraint resource handling
* Style fixes
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_pointer_constraints_v1.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/include/wlr/types/wlr_pointer_constraints_v1.h b/include/wlr/types/wlr_pointer_constraints_v1.h index 6fdae9c4..97edf0ea 100644 --- a/include/wlr/types/wlr_pointer_constraints_v1.h +++ b/include/wlr/types/wlr_pointer_constraints_v1.h @@ -48,6 +48,10 @@ struct wlr_pointer_constraint_v1 { struct wl_list link; // wlr_pointer_constraints_v1::constraints + struct { + struct wl_signal destroy; + } events; + void *data; }; @@ -59,15 +63,9 @@ struct wlr_pointer_constraints_v1 { /** * Called when a new pointer constraint is created. * - * data: wlr_pointer_constraint_v1* + * data: struct wlr_pointer_constraint_v1 * */ - struct wl_signal constraint_create; - /** - * Called when a pointer constraint is destroyed. - * - * data: wlr_pointer_constraint_v1* - */ - struct wl_signal constraint_destroy; + struct wl_signal new_constraint; } events; struct wl_list constraints; // wlr_pointer_constraint_v1::link @@ -78,10 +76,11 @@ struct wlr_pointer_constraints_v1 { struct wlr_pointer_constraints_v1 *wlr_pointer_constraints_v1_create( struct wl_display *display); void wlr_pointer_constraints_v1_destroy( - struct wlr_pointer_constraints_v1 *wlr_pointer_constraints_v1); + struct wlr_pointer_constraints_v1 *pointer_constraints); -struct wlr_pointer_constraint_v1 *wlr_pointer_constraints_v1_constraint_for_surface( - struct wlr_pointer_constraints_v1 *wlr_pointer_constraints_v1, +struct wlr_pointer_constraint_v1 * + wlr_pointer_constraints_v1_constraint_for_surface( + struct wlr_pointer_constraints_v1 *pointer_constraints, struct wlr_surface *surface, struct wlr_seat *seat); void wlr_pointer_constraint_v1_send_activated( @@ -89,5 +88,4 @@ void wlr_pointer_constraint_v1_send_activated( void wlr_pointer_constraint_v1_send_deactivated( struct wlr_pointer_constraint_v1 *constraint); - #endif |