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

Windows.h, Window.c*: reformat comments

parent fba279d3
...@@ -99,8 +99,7 @@ Bool nxagentVisibilityStop = False; ...@@ -99,8 +99,7 @@ Bool nxagentVisibilityStop = False;
#undef DEBUG #undef DEBUG
/* /*
* Useful to test the window configuration * Useful to test the window configuration failures.
* failures.
*/ */
#ifdef TEST #ifdef TEST
...@@ -128,8 +127,7 @@ static int nxagentExposeSerial = 0; ...@@ -128,8 +127,7 @@ static int nxagentExposeSerial = 0;
StoringPixmapPtr nxagentBSPixmapList[BSPIXMAPLIMIT]; StoringPixmapPtr nxagentBSPixmapList[BSPIXMAPLIMIT];
/* /*
* Used to walk through the window hierarchy * Used to walk through the window hierarchy to find a window
* to find a window
*/ */
typedef struct _WindowMatch typedef struct _WindowMatch
...@@ -337,9 +335,8 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -337,9 +335,8 @@ Bool nxagentCreateWindow(WindowPtr pWin)
#endif #endif
/* /*
* Select the event mask if window is a top level * Select the event mask if window is a top level window. This at
* window. This at least makes the keyboard barely * least makes the keyboard barely work.
* work.
*/ */
#ifdef TEST #ifdef TEST
...@@ -415,9 +412,8 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -415,9 +412,8 @@ Bool nxagentCreateWindow(WindowPtr pWin)
#endif #endif
/* /*
* Set the WM_DELETE_WINDOW protocols on every * Set the WM_DELETE_WINDOW protocols on every top level
* top level window. Also redirect the window * window. Also redirect the window if it is a top level.
* if it is a top level.
*/ */
if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin))
...@@ -430,9 +426,8 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -430,9 +426,8 @@ Bool nxagentCreateWindow(WindowPtr pWin)
nxagentAddPropertyToList(prop, pWin); nxagentAddPropertyToList(prop, pWin);
/* /*
* Redirect the window to the off-screen * Redirect the window to the off-screen memory, if the composite
* memory, if the composite extension is * extension is supported on the display.
* supported on the display.
*/ */
/* /*
FIXME: Do all the windows for which nxagentWindowTopLevel(pWin) FIXME: Do all the windows for which nxagentWindowTopLevel(pWin)
...@@ -483,8 +478,7 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -483,8 +478,7 @@ Bool nxagentCreateWindow(WindowPtr pWin)
fbCreateWindow(pWin); fbCreateWindow(pWin);
/* /*
* Only the root window will have * Only the root window will have the right colormap.
* the right colormap.
*/ */
if (!pWin->parent) if (!pWin->parent)
...@@ -707,10 +701,9 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) ...@@ -707,10 +701,9 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
nxagentWMDetect(); nxagentWMDetect();
/* /*
* The smart scheduler could be stopped while * The smart scheduler could be stopped while waiting for the
* waiting for the reply. In this case we need * reply. In this case we need to yield explicitly to avoid to be
* to yield explicitly to avoid to be stuck in * stuck in the dispatch loop forever.
* the dispatch loop forever.
*/ */
isItTimeToYield = 1; isItTimeToYield = 1;
...@@ -834,8 +827,8 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) ...@@ -834,8 +827,8 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
if (i < 100) if (i < 100)
{ {
/* /*
* The window manager has done with the reparent * The window manager has done with the reparent operation. We
* operation. We can resize and map the window. * can resize and map the window.
*/ */
nxagentChangeOption(Fullscreen, True); nxagentChangeOption(Fullscreen, True);
...@@ -879,8 +872,8 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) ...@@ -879,8 +872,8 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
nxagentOption(RootX), nxagentOption(RootY)); nxagentOption(RootX), nxagentOption(RootY));
/* /*
* We disable the screensaver when changing * We disable the screensaver on the real Xserver when changing mode to
* mode to fullscreen. Is it really needed? * fullscreen. Is it really needed?
*/ */
XSetScreenSaver(nxagentDisplay, 0, 0, DefaultExposures, DefaultBlanking); XSetScreenSaver(nxagentDisplay, 0, 0, DefaultExposures, DefaultBlanking);
...@@ -1165,11 +1158,10 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift) ...@@ -1165,11 +1158,10 @@ 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
* to the remote expose region. This is done to * expose region. This is done to refresh the areas showed newly
* refresh the areas showed newly in the viewport. * in the viewport. We create two rectangles, one for
* We create two rectangles, one for horizontal * horizontal pan and one for vertical pan.
* pan and one for vertical pan.
*/ */
BoxRec hRect = {.x1 = -newX, .y1 = -newY}; BoxRec hRect = {.x1 = -newX, .y1 = -newY};
...@@ -1624,10 +1616,9 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) ...@@ -1624,10 +1616,9 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
case BackgroundPixmap: case BackgroundPixmap:
{ {
/* /*
* If a window background is corrupted, we grant * If a window background is corrupted, we grant its usability
* its usability by clearing it with a solid co- * by clearing it with a solid color. When the pixmap will be
* lor. When the pixmap will be fully synchroni- * fully synchronized, an expose will be sent to the window's
* zed, an expose will be sent to the window's
* hierarchy. * hierarchy.
*/ */
...@@ -1645,8 +1636,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) ...@@ -1645,8 +1636,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
nxagentAllocateCorruptedResource((DrawablePtr) pWin -> background.pixmap, RT_NX_CORR_BACKGROUND); nxagentAllocateCorruptedResource((DrawablePtr) pWin -> background.pixmap, RT_NX_CORR_BACKGROUND);
/* /*
* Clearing the remote background to * Clearing the remote background to make it usable.
* make it usable.
*/ */
nxagentFillRemoteRegion((DrawablePtr) pWin -> background.pixmap, nxagentFillRemoteRegion((DrawablePtr) pWin -> background.pixmap,
...@@ -1708,9 +1698,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) ...@@ -1708,9 +1698,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
} }
/* /*
* As we set this bit, we must change dix in * As we set this bit, we must change dix in order not to perform
* order not to perform PositionWindow and let * PositionWindow and let X move children windows for us.
* X move children windows for us.
*/ */
if (mask & CWWinGravity) if (mask & CWWinGravity)
...@@ -1719,8 +1708,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) ...@@ -1719,8 +1708,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
} }
/* /*
FIXME: Do we need to set the attribute on the FIXME: Do we need to set the attribute on the remote display?
remote display?
*/ */
if (mask & CWBackingStore) if (mask & CWBackingStore)
{ {
...@@ -1762,8 +1750,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) ...@@ -1762,8 +1750,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
} }
/* /*
FIXME: Do we need to set the attribute on the FIXME: Do we need to set the attribute on the remote display?
remote display?
*/ */
if (mask & CWSaveUnder) if (mask & CWSaveUnder)
{ {
...@@ -1789,9 +1776,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) ...@@ -1789,9 +1776,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
ColormapPtr pCmap = (ColormapPtr) LookupIDByType(wColormap(pWin), RT_COLORMAP); ColormapPtr pCmap = (ColormapPtr) LookupIDByType(wColormap(pWin), RT_COLORMAP);
/* /*
FIXME: When the caller is nxagentReconfigureWindow FIXME: When the caller is nxagentReconfigureWindow sometimes
sometimes wColormap(pWin) is 0. Could a window wColormap(pWin) is 0. Could a window have no colormap?
have no colormap?
*/ */
if (pCmap != NULL) if (pCmap != NULL)
{ {
...@@ -2005,9 +1991,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) ...@@ -2005,9 +1991,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
#endif #endif
/* /*
* The framebuffer operations don't take care of * The framebuffer operations don't take care of clipping to the
* clipping to the actual area of the framebuffer * actual area of the framebuffer so we need to clip ourselves.
* so we need to clip ourselves.
*/ */
RegionRec temp; RegionRec temp;
...@@ -2020,9 +2005,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) ...@@ -2020,9 +2005,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
{ {
/* /*
* The framebuffer operations don't take care of * The framebuffer operations don't take care of clipping to the
* clipping to the actual area of the framebuffer * actual area of the framebuffer so we need to clip ourselves.
* so we need to clip ourselves.
*/ */
RegionRec temp; RegionRec temp;
...@@ -2239,8 +2223,8 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo ...@@ -2239,8 +2223,8 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
#endif #endif
/* /*
* Mark this region for sending a synchro, * Mark this region for sending a synchro, in
* in nxagentFlushConfigureWindow(). * nxagentFlushConfigureWindow().
*/ */
nxagentExposeQueue.exposures[index].synchronize = 1; nxagentExposeQueue.exposures[index].synchronize = 1;
...@@ -2567,9 +2551,8 @@ void nxagentMapDefaultWindows(void) ...@@ -2567,9 +2551,8 @@ void nxagentMapDefaultWindows(void)
XMapWindow(nxagentDisplay, nxagentInputWindows[pScreen->myNum]); XMapWindow(nxagentDisplay, nxagentInputWindows[pScreen->myNum]);
/* /*
* At reconnection the Input Window is * At reconnection the Input Window is raised in
* raised in nxagentReconnectAllWindows, * nxagentReconnectAllWindows, after the Root Window is mapped.
* after the Root Window is mapped.
*/ */
if (nxagentReconnectTrap == 0) if (nxagentReconnectTrap == 0)
...@@ -2579,8 +2562,7 @@ void nxagentMapDefaultWindows(void) ...@@ -2579,8 +2562,7 @@ void nxagentMapDefaultWindows(void)
} }
/* /*
* Send a SetSelectionOwner request * Send a SetSelectionOwner request to notify of the agent start.
* to notify of the agent start.
*/ */
XSetSelectionOwner(nxagentDisplay, serverTransToAgentProperty, XSetSelectionOwner(nxagentDisplay, serverTransToAgentProperty,
...@@ -2756,9 +2738,8 @@ Bool nxagentReconnectAllWindows(void *p0) ...@@ -2756,9 +2738,8 @@ Bool nxagentReconnectAllWindows(void *p0)
} }
/* /*
* After the Root Window has * After the Root Window has been mapped, the Input Windows is
* been mapped, the Input * raised.
* Windows is raised.
*/ */
if (nxagentOption(Rootless) == 0) if (nxagentOption(Rootless) == 0)
...@@ -2975,14 +2956,12 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer ...@@ -2975,14 +2956,12 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
#endif #endif
/* /*
* FIXME: This quick hack is intended to solve a * FIXME: This quick hack is intended to solve a problem of NXWin X
* problem of NXWin X server for windows. * server for windows. The NXWin minimize the windows moving
* The NXWin minimize the windows moving them * them out of the screen area, this behaviour can cause
* out of the screen area, this behaviour * problem when a rootless session is disconnected and an
* can cause problem when a rootless session * apps is minimized. It will be solved with new Xorg
* is disconnected and an apps is minimized. * version of the NXWin server.
* It will be solved with new Xorg version of
* the NXWin server.
*/ */
if (nxagentOption(Rootless)) if (nxagentOption(Rootless))
...@@ -3025,9 +3004,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer ...@@ -3025,9 +3004,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
#endif #endif
/* /*
* We have to set the WM_DELETE_WINDOW protocols * We have to set the WM_DELETE_WINDOW protocols on every top level
* on every top level window, because we don't know * window, because we don't know if a client handles this.
* if a client handles this.
*/ */
if (nxagentOption(Rootless) && (pWin != screenInfo.screens[0]->root)) if (nxagentOption(Rootless) && (pWin != screenInfo.screens[0]->root))
...@@ -3062,8 +3040,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer ...@@ -3062,8 +3040,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
&type, &format, &nItems, &bytesLeft, &data); &type, &format, &nItems, &bytesLeft, &data);
/* /*
* 72 is the number of bytes returned by * 72 is the number of bytes returned by sizeof(XSizeHints) on
* sizeof(XSizeHints) on 32 bit platforms. * 32 bit platforms.
*/ */
if (ret == Success && if (ret == Success &&
......
...@@ -50,16 +50,14 @@ typedef struct ...@@ -50,16 +50,14 @@ typedef struct
void *pPicture; void *pPicture;
/* /*
* Set if the window is mapped * Set if the window is mapped on the remote server.
* on the remote server.
*/ */
int isMapped; int isMapped;
/* /*
* Set if the window on the remote * Set if the window on the remote server is redirected by using the
* server is redirected by using * composite extension.
* the composite extension.
*/ */
int isRedirected; int isRedirected;
...@@ -116,9 +114,8 @@ extern int nxagentWindowPrivateIndex; ...@@ -116,9 +114,8 @@ extern int nxagentWindowPrivateIndex;
#define nxagentWindow(pWin) (nxagentWindowPriv(pWin)->window) #define nxagentWindow(pWin) (nxagentWindowPriv(pWin)->window)
/* /*
* Window is either a child of our root * Window is either a child of our root or a child of the root of the
* or a child of the root of the real X * real X server.
* server.
*/ */
#define nxagentWindowParent(pWin) \ #define nxagentWindowParent(pWin) \
...@@ -165,8 +162,7 @@ extern int nxagentWindowPrivateIndex; ...@@ -165,8 +162,7 @@ extern int nxagentWindowPrivateIndex;
#define CW_RootlessRestack (1 << 18) #define CW_RootlessRestack (1 << 18)
/* /*
* This force the agent to send exposures * This force the agent to send exposures for all windows.
* for all windows.
*/ */
#define nxagentRefreshScreen() \ #define nxagentRefreshScreen() \
...@@ -182,17 +178,16 @@ extern XlibAtom serverTransToAgentProperty; ...@@ -182,17 +178,16 @@ extern XlibAtom serverTransToAgentProperty;
#endif #endif
/* /*
* If the rectangles in an exposed region exceed * If the rectangles in an exposed region exceed the number of 4, we
* the number of 4, we let the function decide if * let the function decide if it is better to send the window extents
* it is better to send the window extents rather * rather than the rectangles in the region.
* than the rectangles in the region.
*/ */
int nxagentExtentsPredicate(int total); int nxagentExtentsPredicate(int total);
/* /*
* Agent's nested window procedures. Look also * Agent's nested window procedures. Look also at Rootless.h for the
* at Rootless.h for the rootless counterparts. * rootless counterparts.
*/ */
Bool nxagentCreateWindow(WindowPtr pWin); Bool nxagentCreateWindow(WindowPtr pWin);
...@@ -250,8 +245,8 @@ void nxagentMapDefaultWindows(void); ...@@ -250,8 +245,8 @@ void nxagentMapDefaultWindows(void);
Bool nxagentSetWindowCursors(void *p0); Bool nxagentSetWindowCursors(void *p0);
/* /*
* The ConfigureWindow procedure has not * The ConfigureWindow procedure has not a pointer in the screen
* a pointer in the screen structure. * structure.
*/ */
void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask); void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask);
...@@ -265,10 +260,9 @@ extern unsigned long nxagentVisibilityTimeout; ...@@ -265,10 +260,9 @@ extern unsigned long nxagentVisibilityTimeout;
extern Bool nxagentVisibilityStop; extern Bool nxagentVisibilityStop;
/* /*
* Return the pointer to the window given the * Return the pointer to the window given the remote id. It tries to
* remote id. It tries to match the id from * match the id from the last matched window before iterating through
* the last matched window before iterating * the hierarchy.
* through the hierarchy.
*/ */
WindowPtr nxagentGetWindowFromID(Window id); WindowPtr nxagentGetWindowFromID(Window id);
......
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