summaryrefslogtreecommitdiff
path: root/randr/rroutput.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@guitar.keithp.com>2006-09-18 12:18:22 -0700
committerKeith Packard <keithp@guitar.keithp.com>2006-09-18 12:18:22 -0700
commitafe5e9483b352ed06075ed68a6ffa50799194e2d (patch)
treef44e59a037f6132e3873609027c65c837bab4fbc /randr/rroutput.c
parent2be1ac15aee592782d7693b8de2c3815478a094e (diff)
RandR working with old clients and old API.
Diffstat (limited to 'randr/rroutput.c')
-rw-r--r--randr/rroutput.c18
1 files changed, 18 insertions, 0 deletions
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;
}