From afe5e9483b352ed06075ed68a6ffa50799194e2d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 18 Sep 2006 12:18:22 -0700 Subject: RandR working with old clients and old API. --- randr/rroutput.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'randr/rroutput.c') diff --git a/randr/rroutput.c b/randr/rroutput.c index 6b67f1997..ba5bcb451 100644 --- a/randr/rroutput.c +++ b/randr/rroutput.c @@ -56,6 +56,7 @@ RROutputCreate (ScreenPtr pScreen, output->name = (char *) (output + 1); output->nameLength = nameLength; memcpy (output->name, name, nameLength); + output->name[nameLength] = '\0'; output->connection = RR_UnknownConnection; output->subpixelOrder = SubPixelUnknown; output->crtc = NULL; @@ -67,7 +68,13 @@ RROutputCreate (ScreenPtr pScreen, output->modes = NULL; output->changed = TRUE; output->devPrivate = devPrivate; + + if (!AddResource (output->id, RROutputType, (pointer) output)) + return NULL; + + pScrPriv->outputs = outputs; pScrPriv->outputs[pScrPriv->numOutputs++] = output; + pScrPriv->changed = TRUE; return output; } @@ -89,6 +96,7 @@ RROutputSetClones (RROutputPtr output, memcpy (newClones, clones, numClones * sizeof (RROutputPtr)); output->clones = newClones; output->numClones = numClones; + output->changed = TRUE; return TRUE; } @@ -107,6 +115,7 @@ RROutputSetModes (RROutputPtr output, memcpy (newModes, modes, numModes * sizeof (RRModePtr)); output->modes = newModes; output->numModes = numModes; + output->changed = TRUE; return TRUE; } @@ -125,14 +134,23 @@ RROutputSetCrtcs (RROutputPtr output, memcpy (newCrtcs, crtcs, numCrtcs * sizeof (RRCrtcPtr)); output->crtcs = newCrtcs; output->numCrtcs = numCrtcs; + output->changed = TRUE; return TRUE; } +void +RROutputSetCrtc (RROutputPtr output, RRCrtcPtr crtc) +{ + output->crtc = crtc; + output->changed = TRUE; +} + Bool RROutputSetConnection (RROutputPtr output, CARD8 connection) { output->connection = connection; + output->changed = TRUE; return TRUE; } -- cgit v1.2.3