test_console: fix call to kmscon_comp*_use

We should activate the GL context on initialization to allow other subsystems to
create GL objects.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2011-12-30 16:48:20 +01:00
parent 240d6671ba
commit b8124efaf9

View File

@ -202,9 +202,7 @@ static bool vt_switch(struct kmscon_vt *vt, int action, void *data)
if (ret == 0) {
log_info("No output found\n");
} else if (ret > 0) {
ret = kmscon_compositor_use(con->comp);
if (!ret)
activate_outputs(con);
activate_outputs(con);
}
} else {
kmscon_compositor_sleep(con->comp);
@ -281,6 +279,14 @@ static int setup_eloop(struct console *con)
if (ret)
goto err_loop;
ret = kmscon_compositor_new(&con->comp);
if (ret)
goto err_loop;
ret = kmscon_compositor_use(con->comp);
if (ret)
goto err_loop;
ret = kmscon_vt_new(&con->vt, vt_switch, con);
if (ret)
goto err_loop;
@ -289,10 +295,6 @@ static int setup_eloop(struct console *con)
if (ret)
goto err_loop;
ret = kmscon_compositor_new(&con->comp);
if (ret)
goto err_loop;
ret = kmscon_console_new(&con->con);
if (ret)
goto err_loop;