Bugfix: Fix startup when RandR is not present

This commit is contained in:
Michael Stapelberg 2011-11-24 23:49:35 +00:00
parent e09bb51c14
commit 227a58b0c3
1 changed files with 3 additions and 2 deletions

View File

@ -845,9 +845,10 @@ void randr_init(int *event_base) {
const xcb_query_extension_reply_t *extreply; const xcb_query_extension_reply_t *extreply;
extreply = xcb_get_extension_data(conn, &xcb_randr_id); extreply = xcb_get_extension_data(conn, &xcb_randr_id);
if (!extreply->present) if (!extreply->present) {
disable_randr(conn); disable_randr(conn);
else randr_query_outputs(); return;
} else randr_query_outputs();
if (event_base != NULL) if (event_base != NULL)
*event_base = extreply->first_event; *event_base = extreply->first_event;