Commit b61c0f47 authored by Pekka Paalanen's avatar Pekka Paalanen Committed by Kristian Høgsberg
Browse files

protocol: clarify input region on drags and pointers



Drag icon and cursor surfaces must never receive input, so their input
region is always empty.
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <ppaalanen@gmail.com>
parent 39624020
...@@ -337,8 +337,13 @@ ...@@ -337,8 +337,13 @@
The icon surface is an optional (can be nil) surface that The icon surface is an optional (can be nil) surface that
provides an icon to be moved around with the cursor. Initially, provides an icon to be moved around with the cursor. Initially,
the top-left corner of the icon surface is placed at the cursor the top-left corner of the icon surface is placed at the cursor
hotspot, but subsequent surface.attach request can move the hotspot, but subsequent wl_surface.attach request can move the
relative position. relative position. Attach requests must be confirmed with
wl_surface.commit as usual.
The current and pending input regions of the wl_surface are
cleared, and wl_surface.set_input_region is ignored until the
wl_surface is destroyed.
</description> </description>
<arg name="source" type="object" interface="wl_data_source" allow-null="true"/> <arg name="source" type="object" interface="wl_data_source" allow-null="true"/>
<arg name="origin" type="object" interface="wl_surface"/> <arg name="origin" type="object" interface="wl_surface"/>
...@@ -747,7 +752,9 @@ ...@@ -747,7 +752,9 @@
wl_surface.set_input_region changes the pending input region. wl_surface.set_input_region changes the pending input region.
wl_surface.commit copies the pending region to the current region. wl_surface.commit copies the pending region to the current region.
Otherwise the pending and current regions are never changed. Otherwise the pending and current regions are never changed,
except cursor and icon surfaces are special cases, see
wl_pointer.set_cursor and wl_data_device.start_drag.
The initial value for input region is infinite. That means the whole The initial value for input region is infinite. That means the whole
surface will accept input. Setting the pending input region has copy surface will accept input. Setting the pending input region has copy
...@@ -869,11 +876,16 @@ ...@@ -869,11 +876,16 @@
On surface.attach requests to the pointer surface, hotspot_x On surface.attach requests to the pointer surface, hotspot_x
and hotspot_y are decremented by the x and y parameters and hotspot_y are decremented by the x and y parameters
passed to the request. passed to the request. Attach must be confirmed by
wl_surface.commit as usual.
The hotspot can also be updated by passing the current set The hotspot can also be updated by passing the current set
pointer surface to this request with new values for hotspot_x pointer surface to this request with new values for hotspot_x
and/or hotspot_y. and/or hotspot_y.
The current and pending input regions of the wl_surface are
cleared, and wl_surface.set_input_region is ignored until the
wl_surface is destroyed.
</description> </description>
<arg name="serial" type="uint"/> <arg name="serial" type="uint"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment