There is no reason to prohibit a compositor from activating its GL context while
being asleep. It is even recommended to activate the GL context when being
asleep as there is no other way to initialize other subsystems without an GL
context.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
}
/*
- * This activates the EGL/GL context of this compositor. This fails if the
- * compositor is asleep.
+ * This activates the EGL/GL context of this compositor. This works even if the
+ * compositor is asleep. Moreover, most other subsystems that need an GL context
+ * require this function to be called before they are used.
+ *
* You must call this before trying to enable outputs. A new compositor is not
* enabled by default.
* Returns 0 on success.
*/
int kmscon_compositor_use(struct kmscon_compositor *comp)
{
- if (kmscon_compositor_is_asleep(comp))
- return -EINVAL;
-
if (!eglMakeCurrent(comp->display, EGL_NO_SURFACE, EGL_NO_SURFACE,
comp->context))
return -EFAULT;