desktop-shell: screen locking protocol
authorPekka Paalanen <ppaalanen@gmail.com>
Tue, 15 Nov 2011 11:34:48 +0000 (13:34 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 15 Nov 2011 19:18:50 +0000 (14:18 -0500)
commit9ef3e012d61acf71aa495b09f0534857c7695b7e
treed5bbedab62ef8ca58377078bce102d6394049745
parent496433b5411014818c2ea673c0062ca48e5c60ba
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>
clients/desktop-shell.c
compositor/compositor.c
compositor/compositor.h
compositor/shell.c
compositor/tablet-shell.c
protocol/desktop-shell.xml