vl: fix the dri winsys helper screen init
authorChristian König <deathsimple@vodafone.de>
Wed, 24 Oct 2012 09:18:40 +0000 (11:18 +0200)
committerChristian König <deathsimple@vodafone.de>
Fri, 26 Oct 2012 07:53:04 +0000 (09:53 +0200)
Signed-off-by: Christian König <deathsimple@vodafone.de>
src/gallium/auxiliary/vl/vl_winsys_dri.c

index 8e4e026a211e1cb8685d945d106990f182819763..95aabac17e0108b6d9b97afb6049d025cae658ff 100644 (file)
@@ -333,6 +333,8 @@ vl_screen_create(Display *display, int screen)
       goto free_screen;
 
    s = xcb_setup_roots_iterator(xcb_get_setup(scrn->conn));
+   while (screen--)
+       xcb_screen_next(&s);
    connect_cookie = xcb_dri2_connect_unchecked(scrn->conn, s.data->root, XCB_DRI2_DRIVER_TYPE_DRI);
    connect = xcb_dri2_connect_reply(scrn->conn, connect_cookie, NULL);
    if (connect == NULL || connect->driver_name_length + connect->device_name_length == 0)