parent
8125b54e09
commit
41db909522
|
@ -604,7 +604,6 @@ void randr_query_outputs(void) {
|
|||
Output *output, *other, *first;
|
||||
xcb_randr_get_output_primary_cookie_t pcookie;
|
||||
xcb_randr_get_screen_resources_current_cookie_t rcookie;
|
||||
resources_reply *res;
|
||||
|
||||
/* timestamp of the configuration so that we get consistent replies to all
|
||||
* requests (if the configuration changes between our different calls) */
|
||||
|
@ -621,9 +620,11 @@ void randr_query_outputs(void) {
|
|||
ELOG("Could not get RandR primary output\n");
|
||||
else
|
||||
DLOG("primary output is %08x\n", primary->output);
|
||||
if ((res = xcb_randr_get_screen_resources_current_reply(conn, rcookie, NULL)) == NULL)
|
||||
return;
|
||||
|
||||
resources_reply *res = xcb_randr_get_screen_resources_current_reply(conn, rcookie, NULL);
|
||||
if (res == NULL) {
|
||||
ELOG("Could not query screen resources.\n");
|
||||
} else {
|
||||
cts = res->config_timestamp;
|
||||
|
||||
int len = xcb_randr_get_screen_resources_current_outputs_length(res);
|
||||
|
@ -644,6 +645,7 @@ void randr_query_outputs(void) {
|
|||
handle_output(conn, randr_outputs[i], output, cts, res);
|
||||
free(output);
|
||||
}
|
||||
}
|
||||
|
||||
/* If there's no randr output, enable the output covering the root window. */
|
||||
if (any_randr_output_active()) {
|
||||
|
|
Loading…
Reference in New Issue