pointer-constraints: use wlr_surface_synced.commit hook

This fixes a problem where an outdated surface input region was used to
compute the effective confinement region.

Additionally, this commit fixes a bug in pointer_constraint_create()
which caused the initial region to not be applied immediately.

This is a breaking change: set_region is now emitted before the role
commit hook is called, and it's not emitted if the region hasn't
actually changed.
This commit is contained in:
Kirill Primak 2025-01-08 12:16:24 +03:00 committed by Isaac Freund
parent f95270bb5e
commit b25f98d583
2 changed files with 34 additions and 34 deletions

View file

@ -64,7 +64,6 @@ struct wlr_pointer_constraint_v1 {
void *data;
struct {
struct wl_listener surface_commit;
struct wl_listener surface_destroy;
struct wl_listener seat_destroy;