[PATCH] Add wl_surface.enter and wl_surface.leave events

cdahlin at redhat.com cdahlin at redhat.com
Tue Apr 17 14:22:45 PDT 2012


From: Casey Dahlin <cdahlin at redhat.com>

These events let us track when a surface enters or leaves the scanout region of
an output. This way if a surface moves to another output and that output is on
a different card, we can suggest the toolkit reallocate its buffers
appropriately.

Signed-off-by: Casey Dahlin <cdahlin at redhat.com>
---
 protocol/wayland.xml |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index bd3c868..a4382b2 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -644,6 +644,24 @@
 
       <arg name="region" type="object" interface="wl_region"/>
     </request>
+
+    <event name="enter">
+      <description summary="surface enters an output">
+        This is emitted whenever a surface's creation, movement, or resizing
+        results in some part of it being within the scanout region of an
+        output.
+      </description>
+      <arg name="output" type="object" interface="wl_output"/>
+    </event>
+
+    <event name="leave">
+      <description summary="surface leaves an output">
+        This is emitted whenever a surface's creation, movement, or resizing
+        results in it no longer having any part of it within the scanout region
+        of an output.
+      </description>
+      <arg name="output" type="object" interface="wl_output"/>
+    </event>
   </interface>
 
   <interface name="wl_input_device" version="1">
-- 
1.7.7.6



More information about the wayland-devel mailing list