summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergio Gómez <sergio.g.delreal@gmail.com>2023-03-08 17:39:49 -0500
committerSergio Gómez <sergio.g.delreal@gmail.com>2023-03-13 15:16:17 -0500
commite3079393c400e3dc6498234d1d092f3072fa8b44 (patch)
treefb3ffcdc2e38159c0eef46fbd33f3f314715849c /include
parent64da736d37a7df8b3bd6fd43746ac513bae72748 (diff)
downloadweston-e3079393c400e3dc6498234d1d092f3072fa8b44.tar.gz
libweston: Add view unmap listener to pointer constraints
Since the logic of pointer constraints assumes a valid view throughout, add a signal to disable constraints when its current view is unmapped by Weston. The assumption that a previously unmapped view is valid already leads to the constraints code crashing. This can happen when attaching a NULL buffer to the surface and commiting, which effectively unmaps the view with the side effect of clearing the surface's input region, which is then assumed valid inside maybe_warp_confined_pointer(). Fixes: #721 Signed-off-by: Sergio Gómez <sergio.g.delreal@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/libweston/libweston.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h
index 8dd32f3e..858bc50a 100644
--- a/include/libweston/libweston.h
+++ b/include/libweston/libweston.h
@@ -1476,6 +1476,7 @@ struct weston_view {
struct weston_surface *surface;
struct wl_list surface_link;
struct wl_signal destroy_signal;
+ struct wl_signal unmap_signal;
/* struct weston_paint_node::view_link */
struct wl_list paint_node_list;
@@ -1635,6 +1636,7 @@ struct weston_pointer_constraint {
bool hint_is_pending;
struct wl_listener pointer_destroy_listener;
+ struct wl_listener view_unmap_listener;
struct wl_listener surface_commit_listener;
struct wl_listener surface_activate_listener;
};