From 9401e5643e90e23287b785e5fc238bb7c7f2d896 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 6 Sep 2009 19:44:39 +0000 Subject: update to xserver 1.6.4rc1. Tested by many, ok oga@. --- xserver/randr/rrinfo.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'xserver/randr/rrinfo.c') diff --git a/xserver/randr/rrinfo.c b/xserver/randr/rrinfo.c index 7e77d393d..949da2745 100644 --- a/xserver/randr/rrinfo.c +++ b/xserver/randr/rrinfo.c @@ -35,7 +35,7 @@ RROldModeAdd (RROutputPtr output, RRScreenSizePtr size, int refresh) RRModePtr *modes; memset (&modeInfo, '\0', sizeof (modeInfo)); - sprintf (name, "%dx%d", size->width, size->height); + snprintf (name, sizeof(name), "%dx%d", size->width, size->height); modeInfo.width = size->width; modeInfo.height = size->height; @@ -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++) -- cgit v1.2.3