summaryrefslogtreecommitdiff
path: root/protocol
diff options
context:
space:
mode:
authorPekka Paalanen <ppaalanen@gmail.com>2011-11-15 13:34:48 +0200
committerKristian Høgsberg <krh@bitplanet.net>2011-11-15 14:18:50 -0500
commit9ef3e012d61acf71aa495b09f0534857c7695b7e (patch)
treed5bbedab62ef8ca58377078bce102d6394049745 /protocol
parent496433b5411014818c2ea673c0062ca48e5c60ba (diff)
desktop-shell: screen locking protocol
Add protocol and functions for supporting screen locking, triggered by activity timeout. After activity timeout, compositor starts the fade to black, and then enters SLEEPING state. At that point it calls lock() in the shell plugin. When input events trigger a wakeup, unlock() in the shell plugin is called. This sends prepare_lock_surface event to the desktop-shell client. The screen stays locked while the compositor starts fade-in. At this point, desktop-shell client usually creates a surface for the unlocking GUI (e.g. a password prompt), and sends it with the set_lock_surface request. The compositor supposedly shows and allows interaction only with the given lock surface (not yet implemented). When desktop-shell has authenticated the user, or instead of issuing set_lock_surface, it sends the unlock request. Upon receiving the unlock request, the shell plugin unlocks the screen. If desktop-shell client dies, the screen is unlocked automatically. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Diffstat (limited to 'protocol')
-rw-r--r--protocol/desktop-shell.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/protocol/desktop-shell.xml b/protocol/desktop-shell.xml
index 438773d..d099925 100644
--- a/protocol/desktop-shell.xml
+++ b/protocol/desktop-shell.xml
@@ -9,6 +9,12 @@
<arg name="surface" type="object" interface="wl_surface"/>
</request>
+ <request name="set_lock_surface">
+ <arg name="surface" type="object" interface="wl_surface"/>
+ </request>
+
+ <request name="unlock"/>
+
<!-- We'll fold most of wl_shell into this interface and then
they'll share the configure event. -->
<event name="configure">
@@ -19,6 +25,12 @@
<arg name="height" type="int"/>
</event>
+ <!-- Tell the shell we want it to create and set the lock surface,
+ which is a GUI asking the user to unlock the screen. The lock
+ surface is announced with 'set_lock_surface'. Whether or not
+ the shell actually implements locking, it MUST send 'unlock'
+ request to let the normal desktop resume. -->
+ <event name="prepare_lock_surface"/>
</interface>
</protocol>