git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commitf4e3342d2dea7bec4b9df37c4f2a229cfb2b333a
parenta60554a67d
authorIsaac Freund <[email protected]>
date2024-06-25 14:46
rwm: pointer confine and warp

 protocol/river-window-management-v1.xml | 39 ++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/protocol/river-window-management-v1.xml b/protocol/river-window-management-v1.xml
index 46f6df5..6ca7a1b 100644
--- a/protocol/river-window-management-v1.xml
+++ b/protocol/river-window-management-v1.xml
@@ -1026,7 +1026,7 @@
     <request name="pointer_move_window">
       <description summary="start interactive pointer move of a window">
         This request causes the position of a window to be updated while the
-        pointer is moved. Multiple windows may be interactivey moved at the same
+        pointer is moved. Multiple windows may be interactively moved at the same
         time.
 
         The interactive move is ended when all pointer buttons are released.
@@ -1059,6 +1059,43 @@
       <arg name="edges" type="uint" enum="river_window_v1.edges"/>
     </request>
 
+    <request name="pointer_confine_to_region">
+      <description summary="prevent the pointer from leaving a region">
+        This request tells the compositor to confine the movement of the pointer
+        to a given region, preventing movement of the input device from moving
+        the pointer outside the region. In addition, the pointer continues to be
+        confined to the bounds of the outputs.
+
+        If the pointer is not inside the given region when this request is made
+        it will have no effect until the pointer is moved inside the region.
+
+        If the region argument is null the compositor will only confine the
+        cursor to the bounds of the outputs. This is also the behavior if this
+        request is never made.
+
+        The region is defined in the compositor's logical coordinate space.
+
+        This request may be useful to place bounds on an interactive pointer
+        move or resize for example.
+
+        This request is double-buffered state and will not be applied until the
+        next river_window_manager_v1.commit request.
+      </description>
+      <arg name="region" type="object" allow-null="true" interface="wl_region"/>
+    </request>
+
+    <request name="pointer_warp">
+      <description summary="warp the pointer to a given position">
+        Warp the pointer to the given position in the compositor's logical
+        coordinate space.
+
+        This request is double-buffered state and will not be applied until the
+        next river_window_manager_v1.commit request.
+      </description>
+      <arg name="x" type="int"/>
+      <arg name="y" type="int"/>
+    </request>
+
     <enum name="modifiers" bitfield="true">
       <description summary="a set of keyboard modifiers">
         This enum is used to describe the keyboard modifiers that must be held