randr: Don’t enable outputs with mode 0x0

Just a sanity check for some possibly broken drivers.
This commit is contained in:
Michael Stapelberg 2010-03-26 01:52:08 +01:00
parent a151fd95a8
commit 7bd4ea3699
1 changed files with 6 additions and 1 deletions

View File

@ -339,11 +339,16 @@ static void handle_output(xcb_connection_t *conn, xcb_randr_output_t id,
return;
}
new->active = true;
bool updated = update_if_necessary(&(new->rect.x), crtc->x) |
update_if_necessary(&(new->rect.y), crtc->y) |
update_if_necessary(&(new->rect.width), crtc->width) |
update_if_necessary(&(new->rect.height), crtc->height);
free(crtc);
new->active = (new->rect.width != 0 && new->rect.height != 0);
if (!new->active) {
DLOG("width/height 0/0, disabling output\n");
return;
}
DLOG("mode: %dx%d+%d+%d\n", new->rect.width, new->rect.height,
new->rect.x, new->rect.y);