summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-08-12 15:31:10 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-08-12 15:31:10 +0930
commitf367285fd5825e0adc271982a529c9904ad65c89 (patch)
tree4e7081da773c51cc9448cefe17c2c3639f33ad6d /randr
parentb1272eefd9a3e340d65c14903f337747ec82d021 (diff)
parentff4bd3addb48df3eacc4b121cc249a7f38eb981a (diff)
Merge branch 'master' into mpx
Conflicts: Xi/exevents.c dix/devices.c dix/getevents.c include/dix.h mi/mieq.c
Diffstat (limited to 'randr')
-rw-r--r--randr/randrstr.h5
-rw-r--r--randr/rrcrtc.c4
-rw-r--r--randr/rrinfo.c9
-rw-r--r--randr/rroutput.c10
-rw-r--r--randr/rrscreen.c9
5 files changed, 15 insertions, 22 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 4cc3a469e..bd19fe9d0 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -694,9 +694,6 @@ RROutputSetCrtcs (RROutputPtr output,
RRCrtcPtr *crtcs,
int numCrtcs);
-void
-RROutputSetCrtc (RROutputPtr output, RRCrtcPtr crtc);
-
Bool
RROutputSetConnection (RROutputPtr output,
CARD8 connection);
@@ -802,7 +799,6 @@ Query state:
1.2:
RRScreenSetSizeRange
RROutputSetCrtcs
- RROutputSetCrtc
RRModeGet
RROutputSetModes
RROutputSetConnection
@@ -822,7 +818,6 @@ Query state:
RRCrtcCreate
RROutputCreate
RROutputSetCrtcs
- RROutputSetCrtc
RROutputSetConnection
RROutputSetSubpixelOrder
RROldModeAdd • This adds modes one-at-a-time
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index c8c2be264..db5007e28 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -134,6 +134,7 @@ RRCrtcNotify (RRCrtcPtr crtc,
break;
if (j == crtc->numOutputs)
{
+ outputs[i]->crtc = crtc;
RROutputChanged (outputs[i], FALSE);
RRCrtcChanged (crtc, FALSE);
}
@@ -149,6 +150,7 @@ RRCrtcNotify (RRCrtcPtr crtc,
break;
if (i == numOutputs)
{
+ crtc->outputs[j]->crtc = NULL;
RROutputChanged (crtc->outputs[j], FALSE);
RRCrtcChanged (crtc, FALSE);
}
@@ -794,7 +796,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
int source_width = mode->mode.width;
int source_height = mode->mode.height;
- if (rotation == RR_Rotate_90 || rotation == RR_Rotate_270)
+ if ((rotation & 0xf) == RR_Rotate_90 || (rotation & 0xf) == RR_Rotate_270)
{
source_width = mode->mode.height;
source_height = mode->mode.width;
diff --git a/randr/rrinfo.c b/randr/rrinfo.c
index 5ef1a6b83..7e77d393d 100644
--- a/randr/rrinfo.c
+++ b/randr/rrinfo.c
@@ -98,17 +98,18 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations)
if (!output)
return;
RROutputSetCrtcs (output, &crtc, 1);
- RROutputSetCrtc (output, crtc);
RROutputSetConnection (output, RR_Connected);
#ifdef RENDER
RROutputSetSubpixelOrder (output, PictureGetSubpixelOrder (pScreen));
#endif
}
- output = RRFirstOutput (pScreen);
+ output = pScrPriv->outputs[0];
if (!output)
return;
- crtc = output->crtc;
+ crtc = pScrPriv->crtcs[0];
+ if (!crtc)
+ return;
/* check rotations */
if (rotations != crtc->rotations)
@@ -168,7 +169,7 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations)
/* notice current mode */
if (newMode)
- RRCrtcNotify (output->crtc, newMode, 0, 0, pScrPriv->rotation,
+ RRCrtcNotify (crtc, newMode, 0, 0, pScrPriv->rotation,
1, &output);
}
#endif
diff --git a/randr/rroutput.c b/randr/rroutput.c
index e00116283..a67e4931a 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -249,6 +249,7 @@ RROutputDeleteUserMode (RROutputPtr output,
memmove (output->userModes + m, output->userModes + m + 1,
(output->numUserModes - m - 1) * sizeof (RRModePtr));
+ output->numUserModes--;
RRModeDestroy (mode);
return Success;
}
@@ -286,15 +287,6 @@ RROutputSetCrtcs (RROutputPtr output,
return TRUE;
}
-void
-RROutputSetCrtc (RROutputPtr output, RRCrtcPtr crtc)
-{
- if (output->crtc == crtc)
- return;
- output->crtc = crtc;
- RROutputChanged (output, FALSE);
-}
-
Bool
RROutputSetConnection (RROutputPtr output,
CARD8 connection)
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index d92a0ffee..8798b4244 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -738,6 +738,7 @@ ProcRRSetScreenConfig (ClientPtr client)
int rate;
Bool has_rate;
RROutputPtr output;
+ RRCrtcPtr crtc;
RRModePtr mode;
RR10DataPtr pData = NULL;
RRScreenSizePtr pSize;
@@ -783,7 +784,9 @@ ProcRRSetScreenConfig (ClientPtr client)
rep.status = RRSetConfigFailed;
goto sendReply;
}
-
+
+ crtc = output->crtc;
+
/*
* if the client's config timestamp is not the same as the last config
* timestamp, then the config information isn't up-to-date and
@@ -831,7 +834,7 @@ ProcRRSetScreenConfig (ClientPtr client)
return BadValue;
}
- if ((~output->crtc->rotations) & rotation)
+ if ((~crtc->rotations) & rotation)
{
/*
* requested rotation or reflection not supported by screen
@@ -914,7 +917,7 @@ ProcRRSetScreenConfig (ClientPtr client)
}
}
- if (!RRCrtcSet (output->crtc, mode, 0, 0, stuff->rotation, 1, &output))
+ if (!RRCrtcSet (crtc, mode, 0, 0, stuff->rotation, 1, &output))
rep.status = RRSetConfigFailed;
else
rep.status = RRSetConfigSuccess;