mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
dix: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name `walkScreen` for holding current screen pointer everywhere. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
fd3eaf69a1
commit
361b576c48
@@ -651,33 +651,32 @@ CreateConnectionBlock(void)
|
||||
memset(&depth, 0, sizeof(xDepth));
|
||||
memset(&visual, 0, sizeof(xVisualType));
|
||||
for (int i = 0; i < screenInfo.numScreens; i++) {
|
||||
ScreenPtr pScreen;
|
||||
DepthPtr pDepth;
|
||||
VisualPtr pVisual;
|
||||
ScreenPtr walkScreen = screenInfo.screens[i];
|
||||
|
||||
pScreen = screenInfo.screens[i];
|
||||
root.windowId = pScreen->root->drawable.id;
|
||||
root.defaultColormap = pScreen->defColormap;
|
||||
root.whitePixel = pScreen->whitePixel;
|
||||
root.blackPixel = pScreen->blackPixel;
|
||||
root.windowId = walkScreen->root->drawable.id;
|
||||
root.defaultColormap = walkScreen->defColormap;
|
||||
root.whitePixel = walkScreen->whitePixel;
|
||||
root.blackPixel = walkScreen->blackPixel;
|
||||
root.currentInputMask = 0; /* filled in when sent */
|
||||
root.pixWidth = pScreen->width;
|
||||
root.pixHeight = pScreen->height;
|
||||
root.mmWidth = pScreen->mmWidth;
|
||||
root.mmHeight = pScreen->mmHeight;
|
||||
root.minInstalledMaps = pScreen->minInstalledCmaps;
|
||||
root.maxInstalledMaps = pScreen->maxInstalledCmaps;
|
||||
root.rootVisualID = pScreen->rootVisual;
|
||||
root.backingStore = pScreen->backingStoreSupport;
|
||||
root.pixWidth = walkScreen->width;
|
||||
root.pixHeight = walkScreen->height;
|
||||
root.mmWidth = walkScreen->mmWidth;
|
||||
root.mmHeight = walkScreen->mmHeight;
|
||||
root.minInstalledMaps = walkScreen->minInstalledCmaps;
|
||||
root.maxInstalledMaps = walkScreen->maxInstalledCmaps;
|
||||
root.rootVisualID = walkScreen->rootVisual;
|
||||
root.backingStore = walkScreen->backingStoreSupport;
|
||||
root.saveUnders = FALSE;
|
||||
root.rootDepth = pScreen->rootDepth;
|
||||
root.nDepths = pScreen->numDepths;
|
||||
root.rootDepth = walkScreen->rootDepth;
|
||||
root.nDepths = walkScreen->numDepths;
|
||||
memcpy(pBuf, &root, sizeof(xWindowRoot));
|
||||
sizesofar += sizeof(xWindowRoot);
|
||||
pBuf += sizeof(xWindowRoot);
|
||||
|
||||
pDepth = pScreen->allowedDepths;
|
||||
for (int j = 0; j < pScreen->numDepths; j++, pDepth++) {
|
||||
pDepth = walkScreen->allowedDepths;
|
||||
for (int j = 0; j < walkScreen->numDepths; j++, pDepth++) {
|
||||
lenofblock += sizeof(xDepth) +
|
||||
(pDepth->numVids * sizeof(xVisualType));
|
||||
pBuf = (char *) realloc(ConnectionInfo, lenofblock);
|
||||
@@ -694,7 +693,7 @@ CreateConnectionBlock(void)
|
||||
sizesofar += sizeof(xDepth);
|
||||
for (int k = 0; k < pDepth->numVids; k++) {
|
||||
vid = pDepth->vids[k];
|
||||
for (pVisual = pScreen->visuals;
|
||||
for (pVisual = walkScreen->visuals;
|
||||
pVisual->vid != vid; pVisual++);
|
||||
visual.visualID = vid;
|
||||
visual.class = pVisual->class;
|
||||
@@ -3225,14 +3224,14 @@ ProcQueryBestSize(ClientPtr client)
|
||||
int
|
||||
ProcSetScreenSaver(ClientPtr client)
|
||||
{
|
||||
int rc, blankingOption, exposureOption;
|
||||
int blankingOption, exposureOption;
|
||||
|
||||
REQUEST(xSetScreenSaverReq);
|
||||
REQUEST_SIZE_MATCH(xSetScreenSaverReq);
|
||||
|
||||
for (int i = 0; i < screenInfo.numScreens; i++) {
|
||||
rc = XaceHookScreensaverAccess(client, screenInfo.screens[i],
|
||||
DixSetAttrAccess);
|
||||
ScreenPtr walkScreen = screenInfo.screens[i];
|
||||
int rc = XaceHookScreensaverAccess(client, walkScreen, DixSetAttrAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
}
|
||||
@@ -3285,13 +3284,11 @@ ProcSetScreenSaver(ClientPtr client)
|
||||
int
|
||||
ProcGetScreenSaver(ClientPtr client)
|
||||
{
|
||||
int rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
|
||||
for (int i = 0; i < screenInfo.numScreens; i++) {
|
||||
rc = XaceHookScreensaverAccess(client, screenInfo.screens[i],
|
||||
DixGetAttrAccess);
|
||||
ScreenPtr walkScreen = screenInfo.screens[i];
|
||||
int rc = XaceHookScreensaverAccess(client, walkScreen, DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
}
|
||||
@@ -3814,8 +3811,9 @@ SendConnSetup(ClientPtr client, const char *reason)
|
||||
#endif /* XINERAMA */
|
||||
|
||||
for (int i = 0; i < numScreens; i++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[i];
|
||||
xDepth *pDepth;
|
||||
WindowPtr pRoot = screenInfo.screens[i]->root;
|
||||
WindowPtr pRoot = walkScreen->root;
|
||||
|
||||
root->currentInputMask = pRoot->eventMask | wOtherEventMasks(pRoot);
|
||||
pDepth = (xDepth *) (root + 1);
|
||||
|
||||
Reference in New Issue
Block a user