mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
panoramix: clean up PanoramiXTranslateCoords() variable declarations
* declare and assign in one shot * move down reply struct declaration to where it's needed Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
aaea461c6f
commit
475d53fb58
@@ -631,14 +631,6 @@ PanoramiXTranslateCoords(ClientPtr client)
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
xTranslateCoordsReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.sameScreen = xTrue,
|
||||
.child = None
|
||||
};
|
||||
|
||||
if ((pWin == screenInfo.screens[0]->root) ||
|
||||
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid)) {
|
||||
x = stuff->srcX - screenInfo.screens[0]->x;
|
||||
@@ -649,6 +641,8 @@ PanoramiXTranslateCoords(ClientPtr client)
|
||||
y = pWin->drawable.y + stuff->srcY;
|
||||
}
|
||||
pWin = pDst->firstChild;
|
||||
|
||||
XID child = None;
|
||||
while (pWin) {
|
||||
BoxRec box;
|
||||
|
||||
@@ -668,20 +662,31 @@ PanoramiXTranslateCoords(ClientPtr client)
|
||||
x - pWin->drawable.x,
|
||||
y - pWin->drawable.y, &box))
|
||||
) {
|
||||
rep.child = pWin->drawable.id;
|
||||
child = pWin->drawable.id;
|
||||
pWin = (WindowPtr) NULL;
|
||||
}
|
||||
else
|
||||
pWin = pWin->nextSib;
|
||||
}
|
||||
rep.dstX = x - pDst->drawable.x;
|
||||
rep.dstY = y - pDst->drawable.y;
|
||||
|
||||
INT16 dstX = x - pDst->drawable.x;
|
||||
INT16 dstY = y - pDst->drawable.y;
|
||||
if ((pDst == screenInfo.screens[0]->root) ||
|
||||
(pDst->drawable.id == screenInfo.screens[0]->screensaver.wid)) {
|
||||
rep.dstX += screenInfo.screens[0]->x;
|
||||
rep.dstY += screenInfo.screens[0]->y;
|
||||
dstX += screenInfo.screens[0]->x;
|
||||
dstY += screenInfo.screens[0]->y;
|
||||
}
|
||||
|
||||
xTranslateCoordsReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.sameScreen = xTrue,
|
||||
.dstX = dstX,
|
||||
.dstY = dstY,
|
||||
.child = child
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.child);
|
||||
|
||||
Reference in New Issue
Block a user