Fix for xrandr: failed request: BadMatch (invalid param attr) #2159#2288
Fix for xrandr: failed request: BadMatch (invalid param attr) #2159#2288artist4xlibre wants to merge 1 commit intoX11Libre:masterfrom
Conversation
X11Libre#2159 Signed-off-by: artist4xlibre <artist@artixlinux.org>
| 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 || |
There was a problem hiding this comment.
This doesn't handle rotation now
There was a problem hiding this comment.
I did a build from 01e3bbf with this patch applied and a test shows the rotate to work fine without errors.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
MAX cannot work as one of the values already is larger.
I tested with MIN but even that fails.
Fix for xrandr: failed request: BadMatch (invalid parameter attributes) #2159