compositor: add WESTON_COMPOSITOR_OFFSCREEN state
This state is used when the user switches the vt. It turns of rendering
and frame events, but doesn't set the DPMS state to off.
As a part of this change, also turn off the idle timer when entering
the SLEEPING or OFFSCREEN states, which fixes
https://bugs.freedesktop.org/show_bug.cgi?id=61910 (rpi backend
untested).
diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
index 070d187..61cacc7 100644
--- a/src/compositor-fbdev.c
+++ b/src/compositor-fbdev.c
@@ -791,11 +791,11 @@
compositor->base.focus = 0;
compositor->prev_state = compositor->base.state;
- compositor->base.state = WESTON_COMPOSITOR_SLEEPING;
+ weston_compositor_offscreen(&compositor->base);
/* If we have a repaint scheduled (from the idle handler), make
* sure we cancel that so we don't try to pageflip when we're
- * vt switched away. The SLEEPING state will prevent
+ * vt switched away. The OFFSCREEN state will prevent
* further attemps at repainting. When we switch
* back, we schedule a repaint, which will process
* pending frame callbacks. */