Missing lock event in ext_session_lock_manager_v1
Hi!
I've started to implement the ext_session_lock in my compositor for an embedded system. Either I've misunderstood something in the protocol or a lock event is missing.
I need an event so the compositor can ask/request a session to lock. On my system the compositor is the one controlling the backlight. If no user-input has been received from the touch-screen for a specific time the compositor reduce the backlight. Here is where I also like the compositor to be able to tell the lock-screen application that it's time to lock the session.
Since fiddling with official protocols for Wayland is new to me I thought I write this issue before doing a merge-req. since I
- might have misunderstood something here,
- don't have the exact understanding of changes/versioning etc. in staged protocols.
I've made a test implementation on my compositor were I just did the following change in the protocol.
diff --git a/staging/ext-session-lock/ext-session-lock-v1.xml b/staging/ext-session-lock/ext-session-lock-v1.xml
index 5b292cd..cb29dc8 100644
--- a/staging/ext-session-lock/ext-session-lock-v1.xml
+++ b/staging/ext-session-lock/ext-session-lock-v1.xml
@@ -40,6 +40,11 @@
This interface is used to request that the session be locked.
</description>
+ <enum name="error">
+ <entry name="request_lock_on_locked_session" value="0"
+ summary="session is already locked, cannot request a lock"/>
+ </enum>
+
<request name="destroy" type="destructor">
<description summary="destroy the session lock manager object">
This informs the compositor that the session lock manager object will
@@ -57,6 +62,15 @@
</description>
<arg name="id" type="new_id" interface="ext_session_lock_v1"/>
</request>
+
+ <event name="request_lock">
+ <description summary="request a lock manager to lock the session">
+ The compositor is requesting a lock of the session from the session
+ manager client.
+
+ It is up to the client to lock the session or not.
+ </description>
+ </event>
</interface>
<interface name="ext_session_lock_v1" version="1">
This just adds a "request_lock" event on the ext_session_lock_manager_v1 which makes it possible for the compositor to request a session lock.