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.
diff --git a/src/compositor.h b/src/compositor.h
index ef3d2cd..fdee03c 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -593,7 +593,7 @@
void
weston_compositor_wake(struct weston_compositor *compositor);
void
-weston_compositor_activity(struct weston_compositor *compositor);
+weston_compositor_sleep(struct weston_compositor *compositor);
void
weston_compositor_update_drag_surfaces(struct weston_compositor *compositor);