Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion randr/rrscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ ProcRRSetScreenSize(ClientPtr client)
};
pixman_f_transform_bounds(&crtc->f_transform, &display_box);

if (display_box.x2 > stuff->width || display_box.y2 > stuff->height)
if (crtc->x + mode->mode.width > stuff->width ||
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't handle rotation now

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a build from 01e3bbf with this patch applied and a test shows the rotate to work fine without errors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still, the check doesn't look right.
It may work sometimes, but I don't think it is correct.
As I understand the code, it is supposed to take a rectangle, apply a (translated) linear transformation, and compare with what is requested.

If we're reverting, we should revert the entire commit, not just this line: e2550d0

I'm not sure why this breaks though.
Perhaps we should take MAX(display_box.x2, display_box.x1) and MAX(display_box.y2, display_box.y1)?
@metux @cepelinas9000 ping

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAX cannot work as one of the values already is larger.
I tested with MIN but even that fails.

crtc->y + mode->mode.height > stuff->height)
return BadMatch;
}
}
Expand Down
Loading