Commit ea275309 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Window.c: whitespace cleanup

parent 1fb32cf7
...@@ -129,7 +129,7 @@ int nxagentSplashCount = 0; ...@@ -129,7 +129,7 @@ int nxagentSplashCount = 0;
Bool nxagentExposeArrayIsInitialized = False; Bool nxagentExposeArrayIsInitialized = False;
Window nxagentConfiguredSynchroWindow; Window nxagentConfiguredSynchroWindow;
static int nxagentExposeSerial = 0; static int nxagentExposeSerial = 0;
StoringPixmapPtr nxagentBSPixmapList[BSPIXMAPLIMIT]; StoringPixmapPtr nxagentBSPixmapList[BSPIXMAPLIMIT];
...@@ -142,13 +142,10 @@ typedef struct _WindowMatch ...@@ -142,13 +142,10 @@ typedef struct _WindowMatch
{ {
WindowPtr pWin; WindowPtr pWin;
Window id; Window id;
} WindowMatchRec; } WindowMatchRec;
Bool nxagentReconnectAllWindows(void *); Bool nxagentReconnectAllWindows(void *);
Bool nxagentDisconnectAllWindows(void); Bool nxagentDisconnectAllWindows(void);
Bool nxagentIsIconic(WindowPtr); Bool nxagentIsIconic(WindowPtr);
/* /*
...@@ -169,21 +166,13 @@ void nxagentClearSplash(WindowPtr pWin); ...@@ -169,21 +166,13 @@ void nxagentClearSplash(WindowPtr pWin);
*/ */
static Bool nxagentSomeWindowsAreMapped(void); static Bool nxagentSomeWindowsAreMapped(void);
static void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what); static void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
static void nxagentTraverseWindow(WindowPtr, void(*)(void *, XID, void *), void *); static void nxagentTraverseWindow(WindowPtr, void(*)(void *, XID, void *), void *);
static void nxagentDisconnectWindow(void *, XID, void *); static void nxagentDisconnectWindow(void *, XID, void *);
static Bool nxagentLoopOverWindows(void(*)(void *, XID, void *)); static Bool nxagentLoopOverWindows(void(*)(void *, XID, void *));
static void nxagentReconfigureWindowCursor(void *, XID, void *); static void nxagentReconfigureWindowCursor(void *, XID, void *);
static void nxagentReconnectWindow(void *, XID, void *); static void nxagentReconnectWindow(void *, XID, void *);
static void nxagentReconfigureWindow(void *, XID, void *); static void nxagentReconfigureWindow(void *, XID, void *);
static int nxagentForceExposure(WindowPtr pWin, void * ptr); static int nxagentForceExposure(WindowPtr pWin, void * ptr);
/* by dimbor */ /* by dimbor */
...@@ -199,9 +188,7 @@ nxagentWMStateRec; ...@@ -199,9 +188,7 @@ nxagentWMStateRec;
*/ */
#ifdef TEST #ifdef TEST
static Bool nxagentCheckWindowIntegrity(WindowPtr pWin); static Bool nxagentCheckWindowIntegrity(WindowPtr pWin);
#endif #endif
WindowPtr nxagentGetWindowFromID(Window id) WindowPtr nxagentGetWindowFromID(Window id)
...@@ -235,7 +222,6 @@ static int nxagentFindWindowMatch(WindowPtr pWin, void * ptr) ...@@ -235,7 +222,6 @@ static int nxagentFindWindowMatch(WindowPtr pWin, void * ptr)
if (match -> id == nxagentWindow(pWin)) if (match -> id == nxagentWindow(pWin))
{ {
match -> pWin = pWin; match -> pWin = pWin;
return WT_STOPWALKING; return WT_STOPWALKING;
} }
else else
...@@ -247,7 +233,6 @@ static int nxagentFindWindowMatch(WindowPtr pWin, void * ptr) ...@@ -247,7 +233,6 @@ static int nxagentFindWindowMatch(WindowPtr pWin, void * ptr)
WindowPtr nxagentWindowPtr(Window window) WindowPtr nxagentWindowPtr(Window window)
{ {
int i; int i;
WindowMatchRec match; WindowMatchRec match;
match.pWin = NullWindow; match.pWin = NullWindow;
...@@ -406,23 +391,14 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -406,23 +391,14 @@ Bool nxagentCreateWindow(WindowPtr pWin)
nxagentWindowPriv(pWin) -> isMapped = 0; nxagentWindowPriv(pWin) -> isMapped = 0;
nxagentWindowPriv(pWin) -> isRedirected = 0; nxagentWindowPriv(pWin) -> isRedirected = 0;
nxagentWindowPriv(pWin) -> visibilityState = VisibilityUnobscured; nxagentWindowPriv(pWin) -> visibilityState = VisibilityUnobscured;
nxagentWindowPriv(pWin) -> corruptedRegion = RegionCreate(NULL, 1); nxagentWindowPriv(pWin) -> corruptedRegion = RegionCreate(NULL, 1);
nxagentWindowPriv(pWin) -> hasTransparentChildren = 0; nxagentWindowPriv(pWin) -> hasTransparentChildren = 0;
nxagentWindowPriv(pWin) -> containGlyphs = 0; nxagentWindowPriv(pWin) -> containGlyphs = 0;
nxagentWindowPriv(pWin) -> corruptedId = 0; nxagentWindowPriv(pWin) -> corruptedId = 0;
nxagentWindowPriv(pWin) -> deferredBackgroundExpose = 0; nxagentWindowPriv(pWin) -> deferredBackgroundExpose = 0;
nxagentWindowPriv(pWin) -> synchronizationBitmap = NullPixmap; nxagentWindowPriv(pWin) -> synchronizationBitmap = NullPixmap;
nxagentWindowPriv(pWin) -> corruptedTimestamp = 0; nxagentWindowPriv(pWin) -> corruptedTimestamp = 0;
nxagentWindowPriv(pWin) -> splitResource = NULL; nxagentWindowPriv(pWin) -> splitResource = NULL;
if (nxagentOption(Rootless) == 1) if (nxagentOption(Rootless) == 1)
...@@ -464,7 +440,6 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -464,7 +440,6 @@ Bool nxagentCreateWindow(WindowPtr pWin)
if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin))
{ {
Atom prop = nxagentMakeAtom("WM_PROTOCOLS", strlen("WM_PROTOCOLS"), True); Atom prop = nxagentMakeAtom("WM_PROTOCOLS", strlen("WM_PROTOCOLS"), True);
XlibAtom atom = nxagentMakeAtom("WM_DELETE_WINDOW", strlen("WM_DELETE_WINDOW"), True); XlibAtom atom = nxagentMakeAtom("WM_DELETE_WINDOW", strlen("WM_DELETE_WINDOW"), True);
XSetWMProtocols(nxagentDisplay, nxagentWindowPriv(pWin)->window, &atom, 1); XSetWMProtocols(nxagentDisplay, nxagentWindowPriv(pWin)->window, &atom, 1);
...@@ -552,7 +527,6 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -552,7 +527,6 @@ Bool nxagentCreateWindow(WindowPtr pWin)
void nxagentSetVersionProperty(WindowPtr pWin) void nxagentSetVersionProperty(WindowPtr pWin)
{ {
char *name = "NX_AGENT_VERSION"; char *name = "NX_AGENT_VERSION";
Atom prop = MakeAtom(name, strlen(name), True); Atom prop = MakeAtom(name, strlen(name), True);
if (ChangeWindowProperty(pWin, prop, XA_STRING, 8, PropModeReplace, strlen(NX_VERSION_CURRENT_STRING), NX_VERSION_CURRENT_STRING, True) != Success) if (ChangeWindowProperty(pWin, prop, XA_STRING, 8, PropModeReplace, strlen(NX_VERSION_CURRENT_STRING), NX_VERSION_CURRENT_STRING, True) != Success)
...@@ -630,39 +604,26 @@ Bool nxagentDestroyWindow(WindowPtr pWin) ...@@ -630,39 +604,26 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
pWindowPriv->siblingAbove; pWindowPriv->siblingAbove;
} }
#ifdef NXAGENT_SHAPE2 #ifdef NXAGENT_SHAPE2
#ifdef SHAPE #ifdef SHAPE
if (pWindowPriv->boundingShape) if (pWindowPriv->boundingShape)
{ {
RegionDestroy( RegionDestroy(pWindowPriv->boundingShape);
pWindowPriv->boundingShape);
} }
if (pWindowPriv->clipShape) if (pWindowPriv->clipShape)
{ {
RegionDestroy( RegionDestroy(pWindowPriv->clipShape);
pWindowPriv->clipShape);
} }
#endif
#else
RegionDestroy(
pWindowPriv->boundingShape);
RegionDestroy(
pWindowPriv->clipShape);
#endif #endif
#else
RegionDestroy(pWindowPriv->boundingShape);
RegionDestroy(pWindowPriv->clipShape);
#endif
if (pWindowPriv -> corruptedRegion) if (pWindowPriv -> corruptedRegion)
{ {
RegionDestroy( RegionDestroy(pWindowPriv -> corruptedRegion);
pWindowPriv -> corruptedRegion);
pWindowPriv -> corruptedRegion = NULL; pWindowPriv -> corruptedRegion = NULL;
} }
...@@ -677,7 +638,6 @@ Bool nxagentDestroyWindow(WindowPtr pWin) ...@@ -677,7 +638,6 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
} }
nxagentDestroyCorruptedResource((DrawablePtr) pWin, RT_NX_CORR_WINDOW); nxagentDestroyCorruptedResource((DrawablePtr) pWin, RT_NX_CORR_WINDOW);
nxagentDestroyDrawableBitmap((DrawablePtr) pWin); nxagentDestroyDrawableBitmap((DrawablePtr) pWin);
if (pWindowPriv -> splitResource != NULL) if (pWindowPriv -> splitResource != NULL)
...@@ -707,7 +667,6 @@ Bool nxagentDestroyWindow(WindowPtr pWin) ...@@ -707,7 +667,6 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
if (pWin == nxagentRootTileWindow) if (pWin == nxagentRootTileWindow)
{ {
nxagentWindowPriv(nxagentRootTileWindow)->window = None; nxagentWindowPriv(nxagentRootTileWindow)->window = None;
nxagentRootTileWindow = None; nxagentRootTileWindow = None;
} }
...@@ -758,7 +717,6 @@ void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib) ...@@ -758,7 +717,6 @@ void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib)
} }
nxagentAddConfiguredWindow(pWin, CW_RootlessRestack); nxagentAddConfiguredWindow(pWin, CW_RootlessRestack);
} }
void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
...@@ -817,15 +775,13 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) ...@@ -817,15 +775,13 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
if (switchOn) if (switchOn)
{ {
nxagentFullscreenWindow = nxagentDefaultWindows[pScreen -> myNum]; nxagentFullscreenWindow = nxagentDefaultWindows[pScreen -> myNum];
nxagentGrabPointerAndKeyboard(NULL); nxagentGrabPointerAndKeyboard(NULL);
} }
else else
{ {
nxagentFullscreenWindow = None; nxagentFullscreenWindow = None;
nxagentUngrabPointerAndKeyboard(NULL); nxagentUngrabPointerAndKeyboard(NULL);
} }
} }
void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
...@@ -907,7 +863,6 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) ...@@ -907,7 +863,6 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
nxagentChangeOption(Fullscreen, True); nxagentChangeOption(Fullscreen, True);
nxagentChangeOption(AllScreens, True); nxagentChangeOption(AllScreens, True);
/* /*
* Save the window-mode configuration. * Save the window-mode configuration.
...@@ -956,7 +911,6 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) ...@@ -956,7 +911,6 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
if (nxagentIconWindow == None) if (nxagentIconWindow == None)
{ {
nxagentIconWindow = nxagentCreateIconWindow(); nxagentIconWindow = nxagentCreateIconWindow();
XMapWindow(nxagentDisplay, nxagentIconWindow); XMapWindow(nxagentDisplay, nxagentIconWindow);
} }
...@@ -988,7 +942,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) ...@@ -988,7 +942,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
#ifdef WARNING #ifdef WARNING
fprintf(stderr, "nxagentSwitchAllScreens: WARNING! Expected ReparentNotify event missing.\n"); fprintf(stderr, "nxagentSwitchAllScreens: WARNING! Expected ReparentNotify event missing.\n");
#endif #endif
nxagentWMIsRunning = False; nxagentWMIsRunning = False;
attributes.override_redirect = False; attributes.override_redirect = False;
XChangeWindowAttributes(nxagentDisplay, w, valuemask, &attributes); XChangeWindowAttributes(nxagentDisplay, w, valuemask, &attributes);
...@@ -1030,10 +984,8 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) ...@@ -1030,10 +984,8 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
if (nxagentOption(WMBorderWidth) > 0 && nxagentOption(WMTitleHeight) > 0) if (nxagentOption(WMBorderWidth) > 0 && nxagentOption(WMTitleHeight) > 0)
{ {
nxagentChangeOption(X, nxagentOption(SavedX) - nxagentChangeOption(X, nxagentOption(SavedX) - nxagentOption(WMBorderWidth));
nxagentOption(WMBorderWidth)); nxagentChangeOption(Y, nxagentOption(SavedY) - nxagentOption(WMTitleHeight));
nxagentChangeOption(Y, nxagentOption(SavedY) -
nxagentOption(WMTitleHeight));
} }
else else
{ {
...@@ -1064,7 +1016,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) ...@@ -1064,7 +1016,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
XMoveResizeWindow(nxagentDisplay, nxagentInputWindows[0], 0, 0, XMoveResizeWindow(nxagentDisplay, nxagentInputWindows[0], 0, 0,
nxagentOption(Width), nxagentOption(Height)); nxagentOption(Width), nxagentOption(Height));
nxagentSetPrintGeometry(pScreen -> myNum); nxagentSetPrintGeometry(pScreen -> myNum);
} }
#ifdef VIEWPORT_FRAME #ifdef VIEWPORT_FRAME
...@@ -1141,7 +1093,6 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift) ...@@ -1141,7 +1093,6 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift)
#endif #endif
nxagentChangeOption(ViewportXSpan, nxagentOption(Width) - nxagentOption(RootWidth)); nxagentChangeOption(ViewportXSpan, nxagentOption(Width) - nxagentOption(RootWidth));
nxagentChangeOption(ViewportYSpan, nxagentOption(Height) - nxagentOption(RootHeight)); nxagentChangeOption(ViewportYSpan, nxagentOption(Height) - nxagentOption(RootHeight));
if (nxagentOption(ViewportXSpan) < 0) if (nxagentOption(ViewportXSpan) < 0)
...@@ -1224,7 +1175,7 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift) ...@@ -1224,7 +1175,7 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift)
if (nxagentOption(ClientOs) == ClientOsWinnt) if (nxagentOption(ClientOs) == ClientOsWinnt)
{ {
/* /*
* If doMove is True we add exposed rectangles * If doMove is True we add exposed rectangles
* to the remote expose region. This is done to * to the remote expose region. This is done to
* refresh the areas showed newly in the viewport. * refresh the areas showed newly in the viewport.
...@@ -1505,7 +1456,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1505,7 +1456,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
} }
#ifdef NXAGENT_SPLASH #ifdef NXAGENT_SPLASH
/* /*
* This should bring again the splash window * This should bring again the splash window
* on top, so why the else clause? Is this * on top, so why the else clause? Is this
...@@ -1531,8 +1481,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1531,8 +1481,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
* } * }
* } * }
*/ */
#endif /* NXAGENT_SPLASH */
#endif
if (mask & CW_RootlessRestack) if (mask & CW_RootlessRestack)
{ {
...@@ -1571,12 +1520,10 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1571,12 +1520,10 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
} }
#ifdef SHAPE #ifdef SHAPE
if (mask & CW_Shape) if (mask & CW_Shape)
{ {
nxagentShapeWindow(pWin); nxagentShapeWindow(pWin);
} }
#endif #endif
if (mask & CW_Map && if (mask & CW_Map &&
...@@ -1584,7 +1531,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1584,7 +1531,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
nxagentRootlessWindow != pWin)) nxagentRootlessWindow != pWin))
{ {
XMapWindow(nxagentDisplay, nxagentWindow(pWin)); XMapWindow(nxagentDisplay, nxagentWindow(pWin));
return; return;
} }
} }
...@@ -1873,7 +1819,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) ...@@ -1873,7 +1819,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
{ {
if (nxagentOption(Rootless)) if (nxagentOption(Rootless))
{ {
if (pWin->cursorIsNone == 0 && pWin->optional != NULL && if (pWin->cursorIsNone == 0 && pWin->optional != NULL &&
pWin->optional->cursor != NULL && nxagentCursorPriv(pWin -> pWin->optional->cursor != NULL && nxagentCursorPriv(pWin ->
optional -> cursor, pWin -> drawable.pScreen) != NULL) optional -> cursor, pWin -> drawable.pScreen) != NULL)
{ {
...@@ -1934,16 +1880,14 @@ Bool nxagentRealizeWindow(WindowPtr pWin) ...@@ -1934,16 +1880,14 @@ Bool nxagentRealizeWindow(WindowPtr pWin)
} }
} }
#ifdef SHAPE
/* /*
* Not needed. * Not needed.
* *
* nxagentShapeWindow(pWin); #ifdef SHAPE
nxagentShapeWindow(pWin);
#endif
*/ */
#endif /* SHAPE */
/* /*
* Mapping of the root window is called by * Mapping of the root window is called by
* InitRootWindow in DIX. Skip the operation * InitRootWindow in DIX. Skip the operation
...@@ -1999,7 +1943,6 @@ Bool nxagentUnrealizeWindow(WindowPtr pWin) ...@@ -1999,7 +1943,6 @@ Bool nxagentUnrealizeWindow(WindowPtr pWin)
void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
{ {
void (*PaintWindowBackgroundBackup)(WindowPtr, RegionPtr, int); void (*PaintWindowBackgroundBackup)(WindowPtr, RegionPtr, int);
if (pWin->backgroundState == BackgroundPixmap) if (pWin->backgroundState == BackgroundPixmap)
...@@ -2065,11 +2008,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) ...@@ -2065,11 +2008,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
*/ */
RegionInit(&temp, NullBox, 1); RegionInit(&temp, NullBox, 1);
RegionIntersect(&temp, pRegion, &pWin -> clipList); RegionIntersect(&temp, pRegion, &pWin -> clipList);
nxagentFrameBufferPaintWindow(pWin, &temp, what); nxagentFrameBufferPaintWindow(pWin, &temp, what);
RegionUninit(&temp); RegionUninit(&temp);
} }
...@@ -2084,11 +2024,8 @@ void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) ...@@ -2084,11 +2024,8 @@ void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
*/ */
RegionInit(&temp, NullBox, 1); RegionInit(&temp, NullBox, 1);
RegionIntersect(&temp, pRegion, &pWin -> borderClip); RegionIntersect(&temp, pRegion, &pWin -> borderClip);
nxagentFrameBufferPaintWindow(pWin, &temp, what); nxagentFrameBufferPaintWindow(pWin, &temp, what);
RegionUninit(&temp); RegionUninit(&temp);
} }
...@@ -2106,18 +2043,12 @@ void nxagentClipNotify(WindowPtr pWin, int dx, int dy) ...@@ -2106,18 +2043,12 @@ void nxagentClipNotify(WindowPtr pWin, int dx, int dy)
nxagentAddConfiguredWindow(pWin, CWStackingOrder); nxagentAddConfiguredWindow(pWin, CWStackingOrder);
nxagentAddConfiguredWindow(pWin, CW_Shape); nxagentAddConfiguredWindow(pWin, CW_Shape);
#ifdef NXAGENT_SHAPE #ifndef NXAGENT_SHAPE
return; #ifdef SHAPE
#else /*
#ifdef SHAPE
/*
* nxagentShapeWindow(pWin); * nxagentShapeWindow(pWin);
*/ */
#endif /* SHAPE */
#endif /* SHAPE */
#endif /* NXAGENT_SHAPE */ #endif /* NXAGENT_SHAPE */
} }
...@@ -2184,12 +2115,10 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo ...@@ -2184,12 +2115,10 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
nxagentExposeQueue.exposures[i].serial = 0; nxagentExposeQueue.exposures[i].serial = 0;
} }
nxagentExposeQueue.start = 0;
nxagentExposeQueue.length = 0; nxagentExposeQueue.length = 0;
nxagentExposeSerial = 0; nxagentExposeSerial = 0;
nxagentExposeQueue.start = 0;
nxagentConfiguredSynchroWindow = XCreateWindow(nxagentDisplay, DefaultRootWindow(nxagentDisplay), 0, 0, nxagentConfiguredSynchroWindow = XCreateWindow(nxagentDisplay, DefaultRootWindow(nxagentDisplay), 0, 0,
1, 1, 0, 0, InputOutput, 0, CWEventMask, &attributes); 1, 1, 0, 0, InputOutput, 0, CWEventMask, &attributes);
...@@ -2228,7 +2157,6 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo ...@@ -2228,7 +2157,6 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
int index = (nxagentExposeQueue.start + nxagentExposeQueue.length) % EXPOSED_SIZE; int index = (nxagentExposeQueue.start + nxagentExposeQueue.length) % EXPOSED_SIZE;
nxagentExposeQueue.exposures[index].pWindow = pWin; nxagentExposeQueue.exposures[index].pWindow = pWin;
nxagentExposeQueue.exposures[index].localRegion = RegionCreate(NULL, 1); nxagentExposeQueue.exposures[index].localRegion = RegionCreate(NULL, 1);
if (nxagentOption(Rootless) && nxagentWindowPriv(pWin) && if (nxagentOption(Rootless) && nxagentWindowPriv(pWin) &&
...@@ -2270,7 +2198,6 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo ...@@ -2270,7 +2198,6 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
*/ */
nxagentExposeQueue.exposures[index].synchronize = 1; nxagentExposeQueue.exposures[index].synchronize = 1;
nxagentExposeQueue.length++; nxagentExposeQueue.length++;
if (nxagentOption(Rootless) && nxagentWindowPriv(pWin) && if (nxagentOption(Rootless) && nxagentWindowPriv(pWin) &&
...@@ -2390,12 +2317,11 @@ void nxagentShapeWindow(WindowPtr pWin) ...@@ -2390,12 +2317,11 @@ void nxagentShapeWindow(WindowPtr pWin)
#ifdef NXAGENT_SHAPE2 #ifdef NXAGENT_SHAPE2
if (!nxagentWindowPriv(pWin)->boundingShape) if (!nxagentWindowPriv(pWin)->boundingShape)
{ {
nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1); nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1);
} }
#endif #endif
RegionCopy( RegionCopy(nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(pWin));
nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(pWin));
reg = XCreateRegion(); reg = XCreateRegion();
pBox = RegionRects(nxagentWindowPriv(pWin)->boundingShape); pBox = RegionRects(nxagentWindowPriv(pWin)->boundingShape);
...@@ -2423,8 +2349,7 @@ void nxagentShapeWindow(WindowPtr pWin) ...@@ -2423,8 +2349,7 @@ void nxagentShapeWindow(WindowPtr pWin)
fprintf(stderr, "nxagentShapeWindow: wBounding shape does not exist. Removing the shape.\n"); fprintf(stderr, "nxagentShapeWindow: wBounding shape does not exist. Removing the shape.\n");
#endif #endif
RegionEmpty( RegionEmpty(nxagentWindowPriv(pWin)->boundingShape);
nxagentWindowPriv(pWin)->boundingShape);
#ifndef NXAGENT_SHAPE #ifndef NXAGENT_SHAPE
XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin), XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin),
...@@ -2454,8 +2379,7 @@ void nxagentShapeWindow(WindowPtr pWin) ...@@ -2454,8 +2379,7 @@ void nxagentShapeWindow(WindowPtr pWin)
} }
#endif #endif
RegionCopy( RegionCopy(nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin));
nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin));
reg = XCreateRegion(); reg = XCreateRegion();
pBox = RegionRects(nxagentWindowPriv(pWin)->clipShape); pBox = RegionRects(nxagentWindowPriv(pWin)->clipShape);
...@@ -2483,8 +2407,7 @@ void nxagentShapeWindow(WindowPtr pWin) ...@@ -2483,8 +2407,7 @@ void nxagentShapeWindow(WindowPtr pWin)
fprintf(stderr, "nxagentShapeWindow: wClip shape does not exist. Removing the shape.\n"); fprintf(stderr, "nxagentShapeWindow: wClip shape does not exist. Removing the shape.\n");
#endif #endif
RegionEmpty( RegionEmpty(nxagentWindowPriv(pWin)->clipShape);
nxagentWindowPriv(pWin)->clipShape);
#ifndef NXAGENT_SHAPE #ifndef NXAGENT_SHAPE
XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin), XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin),
...@@ -2554,7 +2477,6 @@ void nxagentMapDefaultWindows(void) ...@@ -2554,7 +2477,6 @@ void nxagentMapDefaultWindows(void)
for (i = 0; i < screenInfo.numScreens; i++) for (i = 0; i < screenInfo.numScreens; i++)
{ {
WindowPtr pWin = screenInfo.screens[i]->root; WindowPtr pWin = screenInfo.screens[i]->root;
ScreenPtr pScreen = pWin -> drawable.pScreen; ScreenPtr pScreen = pWin -> drawable.pScreen;
MapWindow(pWin, serverClient); MapWindow(pWin, serverClient);
...@@ -2819,11 +2741,8 @@ Bool nxagentReconnectAllWindows(void *p0) ...@@ -2819,11 +2741,8 @@ Bool nxagentReconnectAllWindows(void *p0)
} }
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG #ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
XSync(nxagentDisplay, 0); XSync(nxagentDisplay, 0);
fprintf(stderr, "nxagentReconnectAllWindows: All windows reconfigured.\n"); fprintf(stderr, "nxagentReconnectAllWindows: All windows reconfigured.\n");
#endif #endif
if (nxagentInitClipboard(screenInfo.screens[0]->root) == -1) if (nxagentInitClipboard(screenInfo.screens[0]->root) == -1)
...@@ -2836,15 +2755,11 @@ Bool nxagentReconnectAllWindows(void *p0) ...@@ -2836,15 +2755,11 @@ Bool nxagentReconnectAllWindows(void *p0)
} }
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG #ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
XSync(nxagentDisplay, 0); XSync(nxagentDisplay, 0);
fprintf(stderr, "nxagentReconnectAllWindows: Clipboard initialized.\n"); fprintf(stderr, "nxagentReconnectAllWindows: Clipboard initialized.\n");
#endif #endif
#ifdef VIEWPORT_FRAME #ifdef VIEWPORT_FRAME
/* /*
* We move the viewport frames out of the way on the X server side. * We move the viewport frames out of the way on the X server side.
*/ */
...@@ -2863,7 +2778,6 @@ Bool nxagentReconnectAllWindows(void *p0) ...@@ -2863,7 +2778,6 @@ Bool nxagentReconnectAllWindows(void *p0)
XMoveWindow(nxagentDisplay, nxagentWindow(nxagentViewportFrameBelow), XMoveWindow(nxagentDisplay, nxagentWindow(nxagentViewportFrameBelow),
0, nxagentOption(RootHeight)); 0, nxagentOption(RootHeight));
} }
#endif /* #ifdef VIEWPORT_FRAME */ #endif /* #ifdef VIEWPORT_FRAME */
return True; return True;
...@@ -3015,9 +2929,6 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer ...@@ -3015,9 +2929,6 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentReconnectWindow: Going to create new window.\n"); fprintf(stderr, "nxagentReconnectWindow: Going to create new window.\n");
#endif
#ifdef TEST
fprintf(stderr, "nxagentReconnectWindow: Recreating %swindow at %p current event mask = %lX mask & CWEventMask = %ld " fprintf(stderr, "nxagentReconnectWindow: Recreating %swindow at %p current event mask = %lX mask & CWEventMask = %ld "
"event_mask = %lX\n", "event_mask = %lX\n",
nxagentWindowTopLevel(pWin) ? "toplevel " : "", (void*)pWin, pWin -> eventMask, nxagentWindowTopLevel(pWin) ? "toplevel " : "", (void*)pWin, pWin -> eventMask,
...@@ -3104,10 +3015,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer ...@@ -3104,10 +3015,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
XSizeHints hints = {0}; XSizeHints hints = {0};
unsigned char *data = NULL; unsigned char *data = NULL;
#ifdef _XSERVER64 #ifdef _XSERVER64
unsigned char *data64 = NULL; unsigned char *data64 = NULL;
unsigned int i; unsigned int i;
#endif #endif
ret = GetWindowProperty(pWin, ret = GetWindowProperty(pWin,
...@@ -3148,11 +3057,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer ...@@ -3148,11 +3057,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
} }
props = (XSizeHints *) data64; props = (XSizeHints *) data64;
#else #else
props = (XSizeHints *) data; props = (XSizeHints *) data;
#endif /* _XSERVER64 */ #endif /* _XSERVER64 */
hints = *props; hints = *props;
...@@ -3284,15 +3190,13 @@ static void nxagentReconfigureWindow(void * param0, XID param1, void * data_buff ...@@ -3284,15 +3190,13 @@ static void nxagentReconfigureWindow(void * param0, XID param1, void * data_buff
#ifdef SHAPE #ifdef SHAPE
if (nxagentWindowPriv(pWin) -> boundingShape) if (nxagentWindowPriv(pWin) -> boundingShape)
{ {
RegionDestroy( RegionDestroy(nxagentWindowPriv(pWin) -> boundingShape);
nxagentWindowPriv(pWin) -> boundingShape);
nxagentWindowPriv(pWin) -> boundingShape = NULL; nxagentWindowPriv(pWin) -> boundingShape = NULL;
} }
if (nxagentWindowPriv(pWin) -> clipShape) if (nxagentWindowPriv(pWin) -> clipShape)
{ {
RegionDestroy( RegionDestroy(nxagentWindowPriv(pWin) -> clipShape);
nxagentWindowPriv(pWin) -> clipShape);
nxagentWindowPriv(pWin) -> clipShape = NULL; nxagentWindowPriv(pWin) -> clipShape = NULL;
} }
nxagentShapeWindow(pWin); nxagentShapeWindow(pWin);
...@@ -3330,7 +3234,6 @@ XXX: This would break Motif menus. ...@@ -3330,7 +3234,6 @@ XXX: This would break Motif menus.
XMoveWindow(nxagentDisplay, nxagentWindow(pWin), XMoveWindow(nxagentDisplay, nxagentWindow(pWin),
nxagentOption(RootX), nxagentOption(RootY)); nxagentOption(RootX), nxagentOption(RootY));
XMapWindow(nxagentDisplay, nxagentWindow(pWin)); XMapWindow(nxagentDisplay, nxagentWindow(pWin));
} }
} }
...@@ -3350,7 +3253,6 @@ Bool nxagentCheckIllegalRootMonitoring(WindowPtr pWin, Mask mask) ...@@ -3350,7 +3253,6 @@ Bool nxagentCheckIllegalRootMonitoring(WindowPtr pWin, Mask mask)
} }
#ifdef TEST #ifdef TEST
Bool nxagentCheckWindowIntegrity(WindowPtr pWin) Bool nxagentCheckWindowIntegrity(WindowPtr pWin)
{ {
Bool integrity = True; Bool integrity = True;
...@@ -3444,8 +3346,7 @@ Bool nxagentCheckWindowIntegrity(WindowPtr pWin) ...@@ -3444,8 +3346,7 @@ Bool nxagentCheckWindowIntegrity(WindowPtr pWin)
return integrity; return integrity;
} }
#endif /* TEST */
#endif
Bool nxagentIsIconic(WindowPtr pWin) Bool nxagentIsIconic(WindowPtr pWin)
{ {
...@@ -3499,13 +3400,11 @@ void nxagentSetTopLevelEventMask(WindowPtr pWin) ...@@ -3499,13 +3400,11 @@ void nxagentSetTopLevelEventMask(WindowPtr pWin)
int nxagentExtentsPredicate(int total) int nxagentExtentsPredicate(int total)
{ {
#ifdef TEST #ifdef TEST
if (total == 6 || total == 11 || total == 10) if (total == 6 || total == 11 || total == 10)
{ {
fprintf(stderr, "nxagentExtentsPredicate: WARNING! Returning [%d] with [%d] rectangles.\n", fprintf(stderr, "nxagentExtentsPredicate: WARNING! Returning [%d] with [%d] rectangles.\n",
(total == 6 || total == 11 || total == 10), total); (total == 6 || total == 11 || total == 10), total);
} }
#endif #endif
return (total == 6 || total == 11 || total == 10); return (total == 6 || total == 11 || total == 10);
...@@ -3996,7 +3895,7 @@ StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId) ...@@ -3996,7 +3895,7 @@ StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId)
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentFindItemBSPixmapList: WARNING! Item not found.\n"); fprintf(stderr, "nxagentFindItemBSPixmapList: WARNING! Item not found.\n");
#endif #endif
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentFindItemBSPixmapList: Pixmap with id [%lu] not found.\n", fprintf(stderr, "nxagentFindItemBSPixmapList: Pixmap with id [%lu] not found.\n",
pixmapId); pixmapId);
...@@ -4006,4 +3905,3 @@ StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId) ...@@ -4006,4 +3905,3 @@ StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId)
return NULL; return NULL;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment