summaryrefslogtreecommitdiff
path: root/randr/rroutput.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-10-05 22:31:35 -0700
committerKeith Packard <keithp@neko.keithp.com>2006-10-05 22:31:35 -0700
commit1178796a4dff5ebf0bd9fb3cacb35be9709b41e5 (patch)
tree16ffa4bec4b696326b44929a32c7fe3ea6e8f16e /randr/rroutput.c
parentb4659faf9b455b44ac8e691cc7a8fc00a967c80b (diff)
Add preferred modes for each output. Round vrefresh. Deliver crtc events.
Diffstat (limited to 'randr/rroutput.c')
-rw-r--r--randr/rroutput.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/randr/rroutput.c b/randr/rroutput.c
index b252d7dec..618ef1f80 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -67,6 +67,7 @@ RROutputCreate (ScreenPtr pScreen,
output->numClones = 0;
output->clones = NULL;
output->numModes = 0;
+ output->numPreferred = 0;
output->modes = NULL;
output->properties = NULL;
output->changed = TRUE;
@@ -120,12 +121,13 @@ RROutputSetClones (RROutputPtr output,
Bool
RROutputSetModes (RROutputPtr output,
RRModePtr *modes,
- int numModes)
+ int numModes,
+ int numPreferred)
{
RRModePtr *newModes;
int i;
- if (numModes == output->numModes)
+ if (numModes == output->numModes && numPreferred == output->numPreferred)
{
for (i = 0; i < numModes; i++)
if (output->modes[i] != modes[i])
@@ -155,6 +157,7 @@ RROutputSetModes (RROutputPtr output,
memcpy (newModes, modes, numModes * sizeof (RRModePtr));
output->modes = newModes;
output->numModes = numModes;
+ output->numPreferred = numPreferred;
output->changed = TRUE;
return TRUE;
}
@@ -341,10 +344,10 @@ ProcRRGetOutputInfo (ClientPtr client)
rep.subpixelOrder = output->subpixelOrder;
rep.nCrtcs = output->numCrtcs;
rep.nModes = output->numModes;
+ rep.nPreferred = output->numPreferred;
rep.nClones = output->numClones;
rep.nameLength = output->nameLength;
rep.possibleOptions = output->possibleOptions;
- rep.pad1 = 42;
extraLen = ((output->numCrtcs +
output->numModes +