Merge pull request #1680 from acrisci/bug/randr-disabled-outputs

Check if output is disabled in handle_output()
This commit is contained in:
Michael Stapelberg 2015-04-26 23:44:03 +02:00
commit 37bee99538
1 changed files with 6 additions and 0 deletions

View File

@ -555,6 +555,12 @@ static void handle_output(xcb_connection_t *conn, xcb_randr_output_t id,
return; return;
} }
if (output->connection == XCB_RANDR_CONNECTION_DISCONNECTED) {
DLOG("Disabling output %s: it is disconnected\n", new->name);
new->to_be_disabled = true;
return;
}
bool updated = update_if_necessary(&(new->rect.x), crtc->x) | bool updated = update_if_necessary(&(new->rect.x), crtc->x) |
update_if_necessary(&(new->rect.y), crtc->y) | update_if_necessary(&(new->rect.y), crtc->y) |
update_if_necessary(&(new->rect.width), crtc->width) | update_if_necessary(&(new->rect.width), crtc->width) |