From 02c589c2d8cbf35371f877b57f05a96548187239 Mon Sep 17 00:00:00 2001
From: Sebastian Wick <sebastian.wick@redhat.com>
Date: Wed, 27 Mar 2024 14:03:17 +0100
Subject: [PATCH] cursor-shape-v1: Make object inert when underlying cap is
 destroyed

It was undefined before how long the wp_cursor_shape_device_v1 has any
effect. Let's specify that the object becomes inert when the pointer cap
goes away or the tablet tool is removed. In those cases the client has
to create a new pointer/tablet tool, and also a new cursor shape device
when the cursor caps or a new tablet tool reappears.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/186
---
 staging/cursor-shape/cursor-shape-v1.xml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/staging/cursor-shape/cursor-shape-v1.xml b/staging/cursor-shape/cursor-shape-v1.xml
index c2cdc6b2..8df2e4ba 100644
--- a/staging/cursor-shape/cursor-shape-v1.xml
+++ b/staging/cursor-shape/cursor-shape-v1.xml
@@ -43,6 +43,9 @@
     <request name="get_pointer">
       <description summary="manage the cursor shape of a pointer device">
         Obtain a wp_cursor_shape_device_v1 for a wl_pointer object.
+
+        When the pointer capability is removed from the wl_seat, the
+        wp_cursor_shape_device_v1 object becomes inert.
       </description>
       <arg name="cursor_shape_device" type="new_id" interface="wp_cursor_shape_device_v1"/>
       <arg name="pointer" type="object" interface="wl_pointer"/>
@@ -51,6 +54,9 @@
     <request name="get_tablet_tool_v2">
       <description summary="manage the cursor shape of a tablet tool device">
         Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object.
+
+        When the zwp_tablet_tool_v2 is removed, the wp_cursor_shape_device_v1
+        object becomes inert.
       </description>
       <arg name="cursor_shape_device" type="new_id" interface="wp_cursor_shape_device_v1"/>
       <arg name="tablet_tool" type="object" interface="zwp_tablet_tool_v2"/>
-- 
GitLab