summaryrefslogtreecommitdiff
path: root/randr/rrxinerama.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-11-16 13:50:48 -0800
committerEric Anholt <eric@anholt.net>2006-11-16 17:39:26 -0800
commitef47d9c3ba63e9a6243fe5c81ccc60c8246352b4 (patch)
tree7a41b5d679cc1bc83ea1d2e2ccd197137aa474d5 /randr/rrxinerama.c
parent07b26e690cd9a4fc626132feed0702515cbe5a88 (diff)
Reduce calls to RRGetInfo.
RRGetInfo can be expensive. Don't invoke it when quering Xinerama information or setting a new CRTC configuration. (cherry picked from commit b5aa9eb8e6eda36856a075f4b008c33f6c706bad)
Diffstat (limited to 'randr/rrxinerama.c')
-rw-r--r--randr/rrxinerama.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index a8e4b390b..771ed0976 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -260,7 +260,11 @@ ProcRRXineramaQueryScreens(ClientPtr client)
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
if (RRXineramaScreenActive (pScreen))
- RRGetInfo (pScreen);
+ {
+ rrScrPriv(pScreen);
+ if (pScrPriv->numCrtcs == 0 || pScrPriv->numOutputs == 0)
+ RRGetInfo (pScreen);
+ }
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;