aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr/rrscreen.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-07 10:14:50 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-21 04:06:27 +0200
commitb943cfe2afbd593e814de47b2f13f8b3b1af78da (patch)
tree54787a27baf87d7e4842aee60cb9c04881901898 /nx-X11/programs/Xserver/randr/rrscreen.c
parente2b0f279ec4932cde94a29e155a286b03a3d7c40 (diff)
downloadnx-libs-b943cfe2afbd593e814de47b2f13f8b3b1af78da.tar.gz
nx-libs-b943cfe2afbd593e814de47b2f13f8b3b1af78da.tar.bz2
nx-libs-b943cfe2afbd593e814de47b2f13f8b3b1af78da.zip
Drop trailing whitespaces (randr extension)
sed -i "s/[ ]\+$//g" randr/*.{c,h} happy reviewing... git diff -w is an empty diff.
Diffstat (limited to 'nx-X11/programs/Xserver/randr/rrscreen.c')
-rw-r--r--nx-X11/programs/Xserver/randr/rrscreen.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/nx-X11/programs/Xserver/randr/rrscreen.c b/nx-X11/programs/Xserver/randr/rrscreen.c
index 70a9be0c6..a13b01dcb 100644
--- a/nx-X11/programs/Xserver/randr/rrscreen.c
+++ b/nx-X11/programs/Xserver/randr/rrscreen.c
@@ -71,7 +71,7 @@ RREditConnectionInfo (ScreenPtr pScreen)
sizeof (xPixmapFormat) * screenInfo.numPixmapFormats);
while (screen != pScreen->myNum)
{
- depth = (xDepth *) ((char *) root +
+ depth = (xDepth *) ((char *) root +
sizeof (xWindowRoot));
for (d = 0; d < root->nDepths; d++)
{
@@ -102,7 +102,7 @@ RRSendConfigNotify (ScreenPtr pScreen)
event.u.configureNotify.y = 0;
/* XXX xinerama stuff ? */
-
+
event.u.configureNotify.width = pWin->drawable.width;
event.u.configureNotify.height = pWin->drawable.height;
event.u.configureNotify.borderWidth = wBorderWidth (pWin);
@@ -117,7 +117,7 @@ RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen)
xRRScreenChangeNotifyEvent se;
RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL;
WindowPtr pRoot = WindowTable[pScreen->myNum];
-
+
se.type = RRScreenChangeNotify + RREventBase;
se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0);
se.timestamp = pScrPriv->lastSetTime.milliseconds;
@@ -167,7 +167,7 @@ RRScreenSizeNotify (ScreenPtr pScreen)
pScrPriv->mmWidth == pScreen->mmWidth &&
pScrPriv->mmHeight == pScreen->mmHeight)
return;
-
+
pScrPriv->width = pScreen->width;
pScrPriv->height = pScreen->height;
pScrPriv->mmWidth = pScreen->mmWidth;
@@ -178,7 +178,7 @@ RRScreenSizeNotify (ScreenPtr pScreen)
RRTellChanged (pScreen);
RRSendConfigNotify (pScreen);
RREditConnectionInfo (pScreen);
-
+
RRPointerScreenConfigured (pScreen);
/*
* Fix pointer bounds and location
@@ -218,7 +218,7 @@ RRScreenSizeSet (ScreenPtr pScreen,
/*
* Retrieve valid screen size range
*/
-int
+int
ProcRRGetScreenSizeRange (ClientPtr client)
{
REQUEST(xRRGetScreenSizeRangeReq);
@@ -227,7 +227,7 @@ ProcRRGetScreenSizeRange (ClientPtr client)
ScreenPtr pScreen;
rrScrPrivPtr pScrPriv;
int rc;
-
+
REQUEST_SIZE_MATCH(xRRGetScreenSizeRangeReq);
#ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
@@ -240,13 +240,13 @@ ProcRRGetScreenSizeRange (ClientPtr client)
pScreen = pWin->drawable.pScreen;
pScrPriv = rrGetScrPriv(pScreen);
-
+
rep.type = X_Reply;
rep.pad = 0;
rep.sequenceNumber = client->sequence;
rep.length = 0;
-
- if (pScrPriv)
+
+ if (pScrPriv)
{
if (!RRGetInfo (pScreen))
return BadAlloc;
@@ -260,7 +260,7 @@ ProcRRGetScreenSizeRange (ClientPtr client)
rep.maxWidth = rep.minWidth = pScreen->width;
rep.maxHeight = rep.minHeight = pScreen->height;
}
- if (client->swapped)
+ if (client->swapped)
{
int n;
@@ -283,7 +283,7 @@ ProcRRSetScreenSize (ClientPtr client)
ScreenPtr pScreen;
rrScrPrivPtr pScrPriv;
int i, rc;
-
+
REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
#ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
@@ -301,13 +301,13 @@ ProcRRSetScreenSize (ClientPtr client)
client->errorValue = stuff->width;
return BadValue;
}
- if (stuff->height < pScrPriv->minHeight ||
+ if (stuff->height < pScrPriv->minHeight ||
pScrPriv->maxHeight < stuff->height)
{
client->errorValue = stuff->height;
return BadValue;
}
- for (i = 0; i < pScrPriv->numCrtcs; i++)
+ for (i = 0; i < pScrPriv->numCrtcs; i++)
{
RRCrtcPtr crtc = pScrPriv->crtcs[i];
RRModePtr mode = crtc->mode;
@@ -322,7 +322,7 @@ ProcRRSetScreenSize (ClientPtr client)
source_width = mode->mode.height;
source_height = mode->mode.width;
}
-
+
if (crtc->x + source_width > stuff->width ||
crtc->y + source_height > stuff->height)
return BadMatch;
@@ -333,7 +333,7 @@ ProcRRSetScreenSize (ClientPtr client)
client->errorValue = 0;
return BadValue;
}
- if (!RRScreenSizeSet (pScreen,
+ if (!RRScreenSizeSet (pScreen,
stuff->width, stuff->height,
stuff->widthInMillimeters,
stuff->heightInMillimeters))
@@ -358,7 +358,7 @@ ProcRRGetScreenResources (ClientPtr client)
RROutput *outputs;
xRRModeInfo *modeinfos;
CARD8 *names;
-
+
REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
#ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
@@ -368,11 +368,11 @@ ProcRRGetScreenResources (ClientPtr client)
#endif
if (rc != Success)
return rc;
-
+
pScreen = pWin->drawable.pScreen;
pScrPriv = rrGetScrPriv(pScreen);
rep.pad = 0;
-
+
if (pScrPriv)
if (!RRGetInfo (pScreen))
return BadAlloc;
@@ -413,8 +413,8 @@ ProcRRGetScreenResources (ClientPtr client)
for (i = 0; i < num_modes; i++)
rep.nbytesNames += modes[i]->mode.nameLength;
- rep.length = (pScrPriv->numCrtcs +
- pScrPriv->numOutputs +
+ rep.length = (pScrPriv->numCrtcs +
+ pScrPriv->numOutputs +
num_modes * (SIZEOF(xRRModeInfo) >> 2) +
((rep.nbytesNames + 3) >> 2));
@@ -470,14 +470,14 @@ ProcRRGetScreenResources (ClientPtr client)
swaps (&modeinfos[i].nameLength, n);
swapl (&modeinfos[i].modeFlags, n);
}
- memcpy (names, mode->name,
+ memcpy (names, mode->name,
mode->mode.nameLength);
names += mode->mode.nameLength;
}
xfree (modes);
assert (((((char *) names - (char *) extra) + 3) >> 2) == rep.length);
}
-
+
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);
@@ -521,8 +521,8 @@ RR10GetData (ScreenPtr pScreen, RROutputPtr output)
Bool *used;
/* Make sure there is plenty of space for any combination */
- data = malloc (sizeof (RR10DataRec) +
- sizeof (RRScreenSize) * nmode +
+ data = malloc (sizeof (RR10DataRec) +
+ sizeof (RRScreenSize) * nmode +
sizeof (RRScreenRate) * nmode +
sizeof (Bool) * nmode);
if (!data)
@@ -536,7 +536,7 @@ RR10GetData (ScreenPtr pScreen, RROutputPtr output)
data->nrefresh = 0;
data->size = 0;
data->refresh = 0;
-
+
/*
* find modes not yet listed
*/
@@ -626,13 +626,13 @@ ProcRRGetScreenInfo (ClientPtr client)
pScreen = pWin->drawable.pScreen;
pScrPriv = rrGetScrPriv(pScreen);
rep.pad = 0;
-
+
if (pScrPriv)
if (!RRGetInfo (pScreen))
return BadAlloc;
output = RRFirstOutput (pScreen);
-
+
if (!pScrPriv || !output)
{
rep.type = X_Reply;
@@ -659,7 +659,7 @@ ProcRRGetScreenInfo (ClientPtr client)
Bool has_rate = RRClientKnowsRates (client);
RR10DataPtr pData;
RRScreenSizePtr pSize;
-
+
pData = RR10GetData (pScreen, output);
if (!pData)
return BadAlloc;
@@ -781,7 +781,7 @@ ProcRRSetScreenConfig (ClientPtr client)
RR10DataPtr pData = NULL;
RRScreenSizePtr pSize;
int width, height;
-
+
UpdateCurrentTime ();
if (RRClientKnowsRates (client))
@@ -794,7 +794,7 @@ ProcRRSetScreenConfig (ClientPtr client)
REQUEST_SIZE_MATCH (xRR1_0SetScreenConfigReq);
has_rate = FALSE;
}
-
+
#ifndef NXAGENT_SERVER
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
#else
@@ -807,9 +807,9 @@ ProcRRSetScreenConfig (ClientPtr client)
pScreen = pDraw->pScreen;
pScrPriv = rrGetScrPriv(pScreen);
-
+
time = ClientTimeToServerTime(stuff->timestamp);
-
+
if (!pScrPriv)
{
time = currentTime;
@@ -818,7 +818,7 @@ ProcRRSetScreenConfig (ClientPtr client)
}
if (!RRGetInfo (pScreen))
return BadAlloc;
-
+
output = RRFirstOutput (pScreen);
if (!output)
{
@@ -843,11 +843,11 @@ ProcRRSetScreenConfig (ClientPtr client)
rep.status = RRSetConfigInvalidConfigTime;
goto sendReply;
}
-
+
pData = RR10GetData (pScreen, output);
if (!pData)
return BadAlloc;
-
+
if (stuff->sizeID >= pData->nsize)
{
/*
@@ -858,7 +858,7 @@ ProcRRSetScreenConfig (ClientPtr client)
return BadValue;
}
pSize = &pData->sizes[stuff->sizeID];
-
+
/*
* Validate requested rotation
*/
@@ -918,7 +918,7 @@ ProcRRSetScreenConfig (ClientPtr client)
}
else
mode = pSize->pRates[0].mode;
-
+
/*
* Make sure the requested set-time is not older than
* the last set-time
@@ -985,9 +985,9 @@ ProcRRSetScreenConfig (ClientPtr client)
/*
* XXX Configure other crtcs to mirror as much as possible
*/
-
+
sendReply:
-
+
if (pData)
xfree (pData);
@@ -1000,7 +1000,7 @@ sendReply:
rep.newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds;
rep.root = WindowTable[pDraw->pScreen->myNum]->drawable.id;
- if (client->swapped)
+ if (client->swapped)
{
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);
@@ -1018,7 +1018,7 @@ RR10CurrentSizeID (ScreenPtr pScreen)
{
CARD16 sizeID = 0xffff;
RROutputPtr output = RRFirstOutput (pScreen);
-
+
if (output)
{
RR10DataPtr data = RR10GetData (pScreen, output);