Don't crash setting a NULL mode with a randr classic DDX. Also remember to update the screen size during modesets.
This commit is contained in:
parent
68c64ad7b1
commit
06c3021aec
|
@ -290,6 +290,12 @@ RRCrtcSet (RRCrtcPtr crtc,
|
||||||
RRScreenRate rate;
|
RRScreenRate rate;
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
|
||||||
|
if (!mode)
|
||||||
|
{
|
||||||
|
RRCrtcNotify (crtc, NULL, x, y, rotation, 0, NULL);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
size.width = mode->mode.width;
|
size.width = mode->mode.width;
|
||||||
size.height = mode->mode.height;
|
size.height = mode->mode.height;
|
||||||
if (outputs[0]->mmWidth && outputs[0]->mmHeight)
|
if (outputs[0]->mmWidth && outputs[0]->mmHeight)
|
||||||
|
@ -310,7 +316,10 @@ RRCrtcSet (RRCrtcPtr crtc,
|
||||||
* Old 1.0 interface tied screen size to mode size
|
* Old 1.0 interface tied screen size to mode size
|
||||||
*/
|
*/
|
||||||
if (ret)
|
if (ret)
|
||||||
|
{
|
||||||
RRCrtcNotify (crtc, mode, x, y, rotation, 1, outputs);
|
RRCrtcNotify (crtc, mode, x, y, rotation, 1, outputs);
|
||||||
|
RRScreenSizeNotify (pScreen);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue