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>
This commit is contained in:
Pekka Paalanen
2011-11-15 13:34:48 +02:00
committed by Kristian Høgsberg
parent 496433b541
commit 9ef3e012d6
6 changed files with 100 additions and 4 deletions
+10 -1
View File
@@ -311,8 +311,17 @@ desktop_shell_configure(void *data,
}
}
static void
desktop_shell_prepare_lock_surface(void *data,
struct desktop_shell *desktop_shell)
{
/* no-op for now */
desktop_shell_unlock(desktop_shell);
}
static const struct desktop_shell_listener listener = {
desktop_shell_configure
desktop_shell_configure,
desktop_shell_prepare_lock_surface
};
static void