summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2007-02-28 16:09:11 -0800
committerKeith Packard <keithp@guitar.keithp.com>2007-03-03 22:21:44 -0800
commit8a0a0d7db04c657c3b7e2e37f78f68f19d478983 (patch)
treeb3f26dc9929eb74201fbcc162f9373150b447514
parent0104f5737bf16ad9cdf0cd3a0e20328c5364e8c7 (diff)
Don't crash setting a NULL mode with a randr classic DDX. Also remember to update the screen size during modesets.
-rw-r--r--randr/rrcrtc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 3cdf12c9f..43a6fcac9 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -299,6 +299,12 @@ RRCrtcSet (RRCrtcPtr crtc,
RRScreenRate rate;
Bool ret;
+ if (!mode)
+ {
+ RRCrtcNotify (crtc, NULL, x, y, rotation, 0, NULL);
+ return TRUE;
+ }
+
size.width = mode->mode.width;
size.height = mode->mode.height;
if (outputs[0]->mmWidth && outputs[0]->mmHeight)
@@ -319,7 +325,10 @@ RRCrtcSet (RRCrtcPtr crtc,
* Old 1.0 interface tied screen size to mode size
*/
if (ret)
+ {
RRCrtcNotify (crtc, mode, x, y, rotation, 1, outputs);
+ RRScreenSizeNotify (pScreen);
+ }
return ret;
}
#endif