mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 00:10:05 +01:00
randr: check for virtual size limits before set crtc
Return a error if the screen is configured to an invalid size.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit d1107918d4)
This commit is contained in:
parent
a3c7b86472
commit
08db658a19
1 changed files with 12 additions and 0 deletions
|
|
@ -915,6 +915,18 @@ ProcRRSetScreenConfig (ClientPtr client)
|
|||
width = mode->mode.height;
|
||||
height = mode->mode.width;
|
||||
}
|
||||
|
||||
if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
|
||||
client->errorValue = width;
|
||||
free(pData);
|
||||
return BadValue;
|
||||
}
|
||||
if (height < pScrPriv->minHeight || pScrPriv->maxHeight < height) {
|
||||
client->errorValue = height;
|
||||
free(pData);
|
||||
return BadValue;
|
||||
}
|
||||
|
||||
if (width != pScreen->width || height != pScreen->height)
|
||||
{
|
||||
int c;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue