aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/randr/rrinfo.c')
-rw-r--r--xorg-server/randr/rrinfo.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/xorg-server/randr/rrinfo.c b/xorg-server/randr/rrinfo.c
index 7e77d393d..12b9a4aab 100644
--- a/xorg-server/randr/rrinfo.c
+++ b/xorg-server/randr/rrinfo.c
@@ -170,7 +170,7 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations)
/* notice current mode */
if (newMode)
RRCrtcNotify (crtc, newMode, 0, 0, pScrPriv->rotation,
- 1, &output);
+ NULL, 1, &output);
}
#endif
@@ -178,12 +178,20 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations)
* Poll the driver for changed information
*/
Bool
-RRGetInfo (ScreenPtr pScreen)
+RRGetInfo (ScreenPtr pScreen, Bool force_query)
{
rrScrPriv (pScreen);
Rotation rotations;
int i;
+ /* Return immediately if we don't need to re-query and we already have the
+ * information.
+ */
+ if (!force_query) {
+ if (pScrPriv->numCrtcs != 0 || pScrPriv->numOutputs != 0)
+ return TRUE;
+ }
+
for (i = 0; i < pScrPriv->numOutputs; i++)
pScrPriv->outputs[i]->changed = FALSE;
for (i = 0; i < pScrPriv->numCrtcs; i++)