aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-29 16:09:45 +0200
committermarha <marha@users.sourceforge.net>2012-06-29 16:09:45 +0200
commit8e69b2fa996acf8fa1d218b67a203eb67e280899 (patch)
tree1caebab7024f5b62dc57e49a69a20ef10cb8210f /xorg-server/randr
parentcd103d3f4d59ac4f09cfcf126e572ddb0b9d4628 (diff)
parentf6d1847eef027266daa0f75ee92ceb09698b2761 (diff)
downloadvcxsrv-8e69b2fa996acf8fa1d218b67a203eb67e280899.tar.gz
vcxsrv-8e69b2fa996acf8fa1d218b67a203eb67e280899.tar.bz2
vcxsrv-8e69b2fa996acf8fa1d218b67a203eb67e280899.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/hw/xwin/glx/gen_gl_wrappers.py xorg-server/hw/xwin/glx/indirect.c
Diffstat (limited to 'xorg-server/randr')
-rw-r--r--xorg-server/randr/randr.c3
-rw-r--r--xorg-server/randr/rrcrtc.c10
-rw-r--r--xorg-server/randr/rrinfo.c7
-rw-r--r--xorg-server/randr/rrmode.c4
-rw-r--r--xorg-server/randr/rroutput.c11
-rw-r--r--xorg-server/randr/rrscreen.c3
6 files changed, 21 insertions, 17 deletions
diff --git a/xorg-server/randr/randr.c b/xorg-server/randr/randr.c
index 4d4298af9..103da48d7 100644
--- a/xorg-server/randr/randr.c
+++ b/xorg-server/randr/randr.c
@@ -446,6 +446,9 @@ RRFirstOutput(ScreenPtr pScreen)
RROutputPtr output;
int i, j;
+ if (!pScrPriv)
+ return NULL;
+
if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
return pScrPriv->primaryOutput;
diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c
index 36caa5822..0c596dd4c 100644
--- a/xorg-server/randr/rrcrtc.c
+++ b/xorg-server/randr/rrcrtc.c
@@ -825,10 +825,9 @@ ProcRRSetCrtcConfig(ClientPtr client)
int numOutputs;
RROutputPtr *outputs = NULL;
RROutput *outputIds;
- TimeStamp configTime;
TimeStamp time;
Rotation rotation;
- int rc, i, j;
+ int ret, i, j;
REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq);
numOutputs = (stuff->length - bytes_to_int32(SIZEOF(xRRSetCrtcConfigReq)));
@@ -855,11 +854,11 @@ ProcRRSetCrtcConfig(ClientPtr client)
outputIds = (RROutput *) (stuff + 1);
for (i = 0; i < numOutputs; i++) {
- rc = dixLookupResourceByType((pointer *) (outputs + i), outputIds[i],
+ ret = dixLookupResourceByType((pointer *) (outputs + i), outputIds[i],
RROutputType, client, DixSetAttrAccess);
- if (rc != Success) {
+ if (ret != Success) {
free(outputs);
- return rc;
+ return ret;
}
/* validate crtc for this output */
for (j = 0; j < outputs[i]->numCrtcs; j++)
@@ -904,7 +903,6 @@ ProcRRSetCrtcConfig(ClientPtr client)
pScrPriv = rrGetScrPriv(pScreen);
time = ClientTimeToServerTime(stuff->timestamp);
- configTime = ClientTimeToServerTime(stuff->configTimestamp);
if (!pScrPriv) {
time = currentTime;
diff --git a/xorg-server/randr/rrinfo.c b/xorg-server/randr/rrinfo.c
index 114ec3471..1408d6f64 100644
--- a/xorg-server/randr/rrinfo.c
+++ b/xorg-server/randr/rrinfo.c
@@ -82,6 +82,7 @@ RRScanOldConfig(ScreenPtr pScreen, Rotation rotations)
int i;
CARD16 minWidth = MAXSHORT, minHeight = MAXSHORT;
CARD16 maxWidth = 0, maxHeight = 0;
+ CARD16 width, height;
/*
* First time through, create a crtc and output and hook
@@ -141,11 +142,11 @@ RRScanOldConfig(ScreenPtr pScreen, Rotation rotations)
/* find size bounds */
for (i = 0; i < output->numModes + output->numUserModes; i++) {
- RRModePtr mode = (i < output->numModes ?
+ mode = (i < output->numModes ?
output->modes[i] :
output->userModes[i - output->numModes]);
- CARD16 width = mode->mode.width;
- CARD16 height = mode->mode.height;
+ width = mode->mode.width;
+ height = mode->mode.height;
if (width < minWidth)
minWidth = width;
diff --git a/xorg-server/randr/rrmode.c b/xorg-server/randr/rrmode.c
index b637c06b9..49a45c7f6 100644
--- a/xorg-server/randr/rrmode.c
+++ b/xorg-server/randr/rrmode.c
@@ -173,7 +173,7 @@ RRModesForScreen(ScreenPtr pScreen, int *num_ret)
*/
for (o = 0; o < pScrPriv->numOutputs; o++) {
RROutputPtr output = pScrPriv->outputs[o];
- int m, n;
+ int n;
for (m = 0; m < output->numModes + output->numUserModes; m++) {
RRModePtr mode = (m < output->numModes ?
@@ -285,7 +285,6 @@ ProcRRCreateMode(ClientPtr client)
xRRCreateModeReply rep = { 0 };
WindowPtr pWin;
ScreenPtr pScreen;
- rrScrPrivPtr pScrPriv;
xRRModeInfo *modeInfo;
long units_after;
char *name;
@@ -298,7 +297,6 @@ ProcRRCreateMode(ClientPtr client)
return rc;
pScreen = pWin->drawable.pScreen;
- pScrPriv = rrGetScrPriv(pScreen);
modeInfo = &stuff->modeInfo;
name = (char *) (stuff + 1);
diff --git a/xorg-server/randr/rroutput.c b/xorg-server/randr/rroutput.c
index 0890c55b5..fbd0e32b3 100644
--- a/xorg-server/randr/rroutput.c
+++ b/xorg-server/randr/rroutput.c
@@ -528,13 +528,13 @@ ProcRRSetOutputPrimary(ClientPtr client)
RROutputPtr output = NULL;
WindowPtr pWin;
rrScrPrivPtr pScrPriv;
- int rc;
+ int ret;
REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
+ ret = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (ret != Success)
+ return ret;
if (stuff->output) {
VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess);
@@ -546,7 +546,8 @@ ProcRRSetOutputPrimary(ClientPtr client)
}
pScrPriv = rrGetScrPriv(pWin->drawable.pScreen);
- RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output);
+ if (pScrPriv)
+ RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output);
return Success;
}
diff --git a/xorg-server/randr/rrscreen.c b/xorg-server/randr/rrscreen.c
index f570afaf4..55110e088 100644
--- a/xorg-server/randr/rrscreen.c
+++ b/xorg-server/randr/rrscreen.c
@@ -248,6 +248,9 @@ ProcRRSetScreenSize(ClientPtr client)
pScreen = pWin->drawable.pScreen;
pScrPriv = rrGetScrPriv(pScreen);
+ if (!pScrPriv)
+ return BadMatch;
+
if (stuff->width < pScrPriv->minWidth || pScrPriv->maxWidth < stuff->width) {
client->errorValue = stuff->width;
return BadValue;