From b8124efaf98559ca250652908c1cb79b00e1fd50 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Fri, 30 Dec 2011 16:48:20 +0100 Subject: [PATCH] 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 --- tests/test_console.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/test_console.c b/tests/test_console.c index 4d336de..85ab183 100644 --- a/tests/test_console.c +++ b/tests/test_console.c @@ -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;