Clean up whitespace
This commit is contained in:
parent
3b6735528e
commit
7e768c08f7
|
@ -54,7 +54,7 @@ compCheckWindow (WindowPtr pWin, pointer data)
|
||||||
PixmapPtr pWinPixmap = (*pScreen->GetWindowPixmap) (pWin);
|
PixmapPtr pWinPixmap = (*pScreen->GetWindowPixmap) (pWin);
|
||||||
PixmapPtr pParentPixmap = pWin->parent ? (*pScreen->GetWindowPixmap) (pWin->parent) : 0;
|
PixmapPtr pParentPixmap = pWin->parent ? (*pScreen->GetWindowPixmap) (pWin->parent) : 0;
|
||||||
PixmapPtr pScreenPixmap = (*pScreen->GetScreenPixmap) (pScreen);
|
PixmapPtr pScreenPixmap = (*pScreen->GetScreenPixmap) (pScreen);
|
||||||
|
|
||||||
if (!pWin->parent)
|
if (!pWin->parent)
|
||||||
{
|
{
|
||||||
assert (pWin->redirectDraw == RedirectDrawNone);
|
assert (pWin->redirectDraw == RedirectDrawNone);
|
||||||
|
@ -122,7 +122,7 @@ compSetPixmapVisitWindow (WindowPtr pWindow, pointer data)
|
||||||
SetWinSize (pWindow);
|
SetWinSize (pWindow);
|
||||||
SetBorderSize (pWindow);
|
SetBorderSize (pWindow);
|
||||||
if (HasBorder (pWindow))
|
if (HasBorder (pWindow))
|
||||||
QueueWorkProc (compRepaintBorder, serverClient,
|
QueueWorkProc (compRepaintBorder, serverClient,
|
||||||
(pointer) pWindow->drawable.id);
|
(pointer) pWindow->drawable.id);
|
||||||
return WT_WALKCHILDREN;
|
return WT_WALKCHILDREN;
|
||||||
}
|
}
|
||||||
|
@ -147,14 +147,14 @@ compCheckRedirect (WindowPtr pWin)
|
||||||
|
|
||||||
should = pWin->realized && (pWin->drawable.class != InputOnly) &&
|
should = pWin->realized && (pWin->drawable.class != InputOnly) &&
|
||||||
(cw != NULL);
|
(cw != NULL);
|
||||||
|
|
||||||
/* Never redirect the overlay window */
|
/* Never redirect the overlay window */
|
||||||
if (cs->pOverlayWin != NULL) {
|
if (cs->pOverlayWin != NULL) {
|
||||||
if (pWin == cs->pOverlayWin) {
|
if (pWin == cs->pOverlayWin) {
|
||||||
should = FALSE;
|
should = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (should != (pWin->redirectDraw != RedirectDrawNone))
|
if (should != (pWin->redirectDraw != RedirectDrawNone))
|
||||||
{
|
{
|
||||||
if (should)
|
if (should)
|
||||||
|
@ -276,10 +276,10 @@ compClipNotify (WindowPtr pWin, int dx, int dy)
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
CompScreenPtr cs = GetCompScreen (pScreen);
|
CompScreenPtr cs = GetCompScreen (pScreen);
|
||||||
CompWindowPtr cw = GetCompWindow (pWin);
|
CompWindowPtr cw = GetCompWindow (pWin);
|
||||||
|
|
||||||
if (cw)
|
if (cw)
|
||||||
{
|
{
|
||||||
if (cw->borderClipX != pWin->drawable.x ||
|
if (cw->borderClipX != pWin->drawable.x ||
|
||||||
cw->borderClipY != pWin->drawable.y)
|
cw->borderClipY != pWin->drawable.y)
|
||||||
{
|
{
|
||||||
REGION_TRANSLATE (pScreen, &cw->borderClip,
|
REGION_TRANSLATE (pScreen, &cw->borderClip,
|
||||||
|
@ -324,7 +324,7 @@ compImplicitRedirect (WindowPtr pWin, WindowPtr pParent)
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
XID winVisual = wVisual (pWin);
|
XID winVisual = wVisual (pWin);
|
||||||
XID parentVisual = wVisual (pParent);
|
XID parentVisual = wVisual (pParent);
|
||||||
|
|
||||||
if (winVisual != parentVisual &&
|
if (winVisual != parentVisual &&
|
||||||
(compIsAlternateVisual (pScreen, winVisual) ||
|
(compIsAlternateVisual (pScreen, winVisual) ||
|
||||||
compIsAlternateVisual (pScreen, parentVisual)))
|
compIsAlternateVisual (pScreen, parentVisual)))
|
||||||
|
@ -345,11 +345,11 @@ compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind)
|
||||||
WindowPtr pParent;
|
WindowPtr pParent;
|
||||||
int draw_x, draw_y;
|
int draw_x, draw_y;
|
||||||
unsigned int w, h, bw;
|
unsigned int w, h, bw;
|
||||||
|
|
||||||
/* if this is a root window, can't be moved */
|
/* if this is a root window, can't be moved */
|
||||||
if (!(pParent = pWin->parent))
|
if (!(pParent = pWin->parent))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bw = wBorderWidth (pWin);
|
bw = wBorderWidth (pWin);
|
||||||
draw_x = pParent->drawable.x + x + (int)bw;
|
draw_x = pParent->drawable.x + x + (int)bw;
|
||||||
draw_y = pParent->drawable.y + y + (int)bw;
|
draw_y = pParent->drawable.y + y + (int)bw;
|
||||||
|
@ -390,18 +390,18 @@ compResizeWindow (WindowPtr pWin, int x, int y,
|
||||||
WindowPtr pParent;
|
WindowPtr pParent;
|
||||||
int draw_x, draw_y;
|
int draw_x, draw_y;
|
||||||
unsigned int bw;
|
unsigned int bw;
|
||||||
|
|
||||||
/* if this is a root window, can't be moved */
|
/* if this is a root window, can't be moved */
|
||||||
if (!(pParent = pWin->parent))
|
if (!(pParent = pWin->parent))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bw = wBorderWidth (pWin);
|
bw = wBorderWidth (pWin);
|
||||||
draw_x = pParent->drawable.x + x + (int)bw;
|
draw_x = pParent->drawable.x + x + (int)bw;
|
||||||
draw_y = pParent->drawable.y + y + (int)bw;
|
draw_y = pParent->drawable.y + y + (int)bw;
|
||||||
compReallocPixmap (pWin, draw_x, draw_y, w, h, bw);
|
compReallocPixmap (pWin, draw_x, draw_y, w, h, bw);
|
||||||
}
|
}
|
||||||
compCheckTree (pScreen);
|
compCheckTree (pScreen);
|
||||||
|
|
||||||
pScreen->ResizeWindow = cs->ResizeWindow;
|
pScreen->ResizeWindow = cs->ResizeWindow;
|
||||||
(*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib);
|
(*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib);
|
||||||
cs->ResizeWindow = pScreen->ResizeWindow;
|
cs->ResizeWindow = pScreen->ResizeWindow;
|
||||||
|
@ -430,11 +430,11 @@ compChangeBorderWidth (WindowPtr pWin, unsigned int bw)
|
||||||
WindowPtr pParent;
|
WindowPtr pParent;
|
||||||
int draw_x, draw_y;
|
int draw_x, draw_y;
|
||||||
unsigned int w, h;
|
unsigned int w, h;
|
||||||
|
|
||||||
/* if this is a root window, can't be moved */
|
/* if this is a root window, can't be moved */
|
||||||
if (!(pParent = pWin->parent))
|
if (!(pParent = pWin->parent))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
draw_x = pWin->drawable.x;
|
draw_x = pWin->drawable.x;
|
||||||
draw_y = pWin->drawable.y;
|
draw_y = pWin->drawable.y;
|
||||||
w = pWin->drawable.width;
|
w = pWin->drawable.width;
|
||||||
|
@ -481,13 +481,13 @@ compReparentWindow (WindowPtr pWin, WindowPtr pPriorParent)
|
||||||
*/
|
*/
|
||||||
if (compImplicitRedirect (pWin, pWin->parent))
|
if (compImplicitRedirect (pWin, pWin->parent))
|
||||||
compRedirectWindow (serverClient, pWin, CompositeRedirectAutomatic);
|
compRedirectWindow (serverClient, pWin, CompositeRedirectAutomatic);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate any necessary redirect pixmap
|
* Allocate any necessary redirect pixmap
|
||||||
* (this actually should never be true; pWin is always unmapped)
|
* (this actually should never be true; pWin is always unmapped)
|
||||||
*/
|
*/
|
||||||
compCheckRedirect (pWin);
|
compCheckRedirect (pWin);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reset pixmap pointers as appropriate
|
* Reset pixmap pointers as appropriate
|
||||||
*/
|
*/
|
||||||
|
@ -514,7 +514,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
{
|
{
|
||||||
PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin);
|
PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin);
|
||||||
CompWindowPtr cw = GetCompWindow (pWin);
|
CompWindowPtr cw = GetCompWindow (pWin);
|
||||||
|
|
||||||
assert (cw->oldx != COMP_ORIGIN_INVALID);
|
assert (cw->oldx != COMP_ORIGIN_INVALID);
|
||||||
assert (cw->oldy != COMP_ORIGIN_INVALID);
|
assert (cw->oldy != COMP_ORIGIN_INVALID);
|
||||||
if (cw->pOldPixmap)
|
if (cw->pOldPixmap)
|
||||||
|
@ -526,7 +526,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
RegionRec rgnDst;
|
RegionRec rgnDst;
|
||||||
PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin);
|
PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin);
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
dx = ptOldOrg.x - pWin->drawable.x;
|
dx = ptOldOrg.x - pWin->drawable.x;
|
||||||
dy = ptOldOrg.y - pWin->drawable.y;
|
dy = ptOldOrg.y - pWin->drawable.y;
|
||||||
REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
|
REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
|
||||||
|
@ -535,10 +535,10 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
|
|
||||||
REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst,
|
REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst,
|
||||||
&pWin->borderClip, prgnSrc);
|
&pWin->borderClip, prgnSrc);
|
||||||
|
|
||||||
REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
|
REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
|
||||||
-pPixmap->screen_x, -pPixmap->screen_y);
|
-pPixmap->screen_x, -pPixmap->screen_y);
|
||||||
|
|
||||||
dx = dx + pPixmap->screen_x - cw->oldx;
|
dx = dx + pPixmap->screen_x - cw->oldx;
|
||||||
dy = dy + pPixmap->screen_y - cw->oldy;
|
dy = dy + pPixmap->screen_y - cw->oldy;
|
||||||
pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
|
pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
|
||||||
|
@ -546,7 +546,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
{
|
{
|
||||||
BoxPtr pBox = REGION_RECTS (&rgnDst);
|
BoxPtr pBox = REGION_RECTS (&rgnDst);
|
||||||
int nBox = REGION_NUM_RECTS (&rgnDst);
|
int nBox = REGION_NUM_RECTS (&rgnDst);
|
||||||
|
|
||||||
ValidateGC(&pPixmap->drawable, pGC);
|
ValidateGC(&pPixmap->drawable, pGC);
|
||||||
while (nBox--)
|
while (nBox--)
|
||||||
{
|
{
|
||||||
|
@ -568,7 +568,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
ptOldOrg.x += dx;
|
ptOldOrg.x += dx;
|
||||||
ptOldOrg.y += dy;
|
ptOldOrg.y += dy;
|
||||||
}
|
}
|
||||||
|
|
||||||
pScreen->CopyWindow = cs->CopyWindow;
|
pScreen->CopyWindow = cs->CopyWindow;
|
||||||
if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y)
|
if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y)
|
||||||
{
|
{
|
||||||
|
@ -634,7 +634,7 @@ compDestroyWindow (WindowPtr pWin)
|
||||||
FreeResource (cw->clients->id, RT_NONE);
|
FreeResource (cw->clients->id, RT_NONE);
|
||||||
while ((csw = GetCompSubwindows (pWin)))
|
while ((csw = GetCompSubwindows (pWin)))
|
||||||
FreeResource (csw->clients->id, RT_NONE);
|
FreeResource (csw->clients->id, RT_NONE);
|
||||||
|
|
||||||
if (pWin->redirectDraw != RedirectDrawNone)
|
if (pWin->redirectDraw != RedirectDrawNone)
|
||||||
compFreePixmap (pWin);
|
compFreePixmap (pWin);
|
||||||
ret = (*pScreen->DestroyWindow) (pWin);
|
ret = (*pScreen->DestroyWindow) (pWin);
|
||||||
|
@ -699,7 +699,7 @@ PictFormatPtr
|
||||||
compWindowFormat (WindowPtr pWin)
|
compWindowFormat (WindowPtr pWin)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
return PictureMatchVisual (pScreen, pWin->drawable.depth,
|
return PictureMatchVisual (pScreen, pWin->drawable.depth,
|
||||||
compGetWindowVisual (pWin));
|
compGetWindowVisual (pWin));
|
||||||
}
|
}
|
||||||
|
@ -716,24 +716,24 @@ compWindowUpdateAutomatic (WindowPtr pWin)
|
||||||
int error;
|
int error;
|
||||||
RegionPtr pRegion = DamageRegion (cw->damage);
|
RegionPtr pRegion = DamageRegion (cw->damage);
|
||||||
PicturePtr pSrcPicture = CreatePicture (0, &pSrcPixmap->drawable,
|
PicturePtr pSrcPicture = CreatePicture (0, &pSrcPixmap->drawable,
|
||||||
pSrcFormat,
|
pSrcFormat,
|
||||||
0, 0,
|
0, 0,
|
||||||
serverClient,
|
serverClient,
|
||||||
&error);
|
&error);
|
||||||
XID subwindowMode = IncludeInferiors;
|
XID subwindowMode = IncludeInferiors;
|
||||||
PicturePtr pDstPicture = CreatePicture (0, &pParent->drawable,
|
PicturePtr pDstPicture = CreatePicture (0, &pParent->drawable,
|
||||||
pDstFormat,
|
pDstFormat,
|
||||||
CPSubwindowMode,
|
CPSubwindowMode,
|
||||||
&subwindowMode,
|
&subwindowMode,
|
||||||
serverClient,
|
serverClient,
|
||||||
&error);
|
&error);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First move the region from window to screen coordinates
|
* First move the region from window to screen coordinates
|
||||||
*/
|
*/
|
||||||
REGION_TRANSLATE (pScreen, pRegion,
|
REGION_TRANSLATE (pScreen, pRegion,
|
||||||
pWin->drawable.x, pWin->drawable.y);
|
pWin->drawable.x, pWin->drawable.y);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clip against the "real" border clip
|
* Clip against the "real" border clip
|
||||||
*/
|
*/
|
||||||
|
@ -742,14 +742,14 @@ compWindowUpdateAutomatic (WindowPtr pWin)
|
||||||
/*
|
/*
|
||||||
* Now translate from screen to dest coordinates
|
* Now translate from screen to dest coordinates
|
||||||
*/
|
*/
|
||||||
REGION_TRANSLATE (pScreen, pRegion,
|
REGION_TRANSLATE (pScreen, pRegion,
|
||||||
-pParent->drawable.x, -pParent->drawable.y);
|
-pParent->drawable.x, -pParent->drawable.y);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clip the picture
|
* Clip the picture
|
||||||
*/
|
*/
|
||||||
SetPictureClipRegion (pDstPicture, 0, 0, pRegion);
|
SetPictureClipRegion (pDstPicture, 0, 0, pRegion);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* And paint
|
* And paint
|
||||||
*/
|
*/
|
||||||
|
@ -813,7 +813,7 @@ CompositeRealChildHead (WindowPtr pWin)
|
||||||
if (!pChild) {
|
if (!pChild) {
|
||||||
return NullWindow;
|
return NullWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
cs = GetCompScreen(pWin->drawable.pScreen);
|
cs = GetCompScreen(pWin->drawable.pScreen);
|
||||||
if (pChild == cs->pOverlayWin) {
|
if (pChild == cs->pOverlayWin) {
|
||||||
return pChild;
|
return pChild;
|
||||||
|
|
Loading…
Reference in New Issue