compositor: Move state tracking complexity into shell
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Thu, 21 Feb 2013 16:35:22 +0000 (18:35 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 22 Feb 2013 02:12:45 +0000 (21:12 -0500)
commit87524b65cb2d8585de5c1efb404dd5a0743cd642
treeb8429a4a21d0e6955a09815635be3a924d2a22e6
parent859e885985a953dfb441d1ffbcd61d62fe08ab10
compositor: Move state tracking complexity into shell

Previously, when coming back from idle the compositor would try to
track if the unlock signal needed to be sent, and the shell would
change the compositor state in order to track when to display or
hide the screensaver.

This patch finishes moving this out of the compositor. With this, the
compositor state should be changed only using the exported functions
weston_compositor_wake() and weston_compositor_sleep(). The unlock
signal will be sent if the compositor wasn't in the ACTIVE state
previously. The lock signal is sent when the compositor becomes idle.

The calls to weston_compositor_wake() in the shell where there to allow
it to trigger the fade in only after the lock surface was configured.
Now the shell has full control of the fade and does not needed to
change the compositor state to do that, so those calls were replaced
with shell_fade() calls.
src/compositor.c
src/compositor.h
src/shell.c