From 2cddd5c5e31f1d46b7a8370ef1c6af4dc33c5bfb Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 28 Jan 2020 08:20:14 +0100 Subject: Splash.c: add nxagentHaveSplashWindow helper --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index d60be1aa7..a39cc035f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -1447,7 +1447,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) * * else if (mask & CWStackMode) * { - * if (nxagentSplashWindow) + * if (nxagentHaveSplashWindow()) * { * valuemask = CWStackMode; * -- cgit v1.2.3 From 5d2dbfaa2be7b4ccc24511edf103c43be5c38052 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 29 Jan 2020 22:23:54 +0100 Subject: Window.c: scope improvements plus some whitespace improvements --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 108 +++++++++++----------------- 1 file changed, 42 insertions(+), 66 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index a39cc035f..a3f3e411a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -764,10 +764,6 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) { - Window w; - XSetWindowAttributes attributes; - unsigned long valuemask; - if (nxagentOption(Rootless)) { return; @@ -787,14 +783,16 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) } } - w = nxagentDefaultWindows[pScreen -> myNum]; + Window w = nxagentDefaultWindows[pScreen -> myNum]; /* * override_redirect makes the window manager ignore the window and * not add decorations, see ICCCM) */ - attributes.override_redirect = switchOn; - valuemask = CWOverrideRedirect; + XSetWindowAttributes attributes = { + .override_redirect = switchOn + }; + unsigned long valuemask = CWOverrideRedirect; XUnmapWindow(nxagentDisplay, w); XChangeWindowAttributes(nxagentDisplay, w, valuemask, &attributes); @@ -1411,10 +1409,9 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) Window parent_return; Window *children_return = NULL; unsigned int nchildren_return; - Status result; - result = XQueryTree(nxagentDisplay, DefaultRootWindow(nxagentDisplay), - &root_return, &parent_return, &children_return, &nchildren_return); + Status result = XQueryTree(nxagentDisplay, DefaultRootWindow(nxagentDisplay), + &root_return, &parent_return, &children_return, &nchildren_return); if (result) { @@ -1622,7 +1619,6 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) case ParentRelative: { attributes.background_pixmap = ParentRelative; - break; } case BackgroundPixmap: @@ -1665,7 +1661,6 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) case BackgroundPixel: { mask &= ~CWBackPixmap; - break; } } @@ -1987,8 +1982,6 @@ void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) { - RegionRec temp; - if (pWin -> realized) { BoxPtr pBox = RegionRects(pRegion); @@ -2017,6 +2010,7 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) * so we need to clip ourselves. */ + RegionRec temp; RegionInit(&temp, NullBox, 1); RegionIntersect(&temp, pRegion, &pWin -> clipList); nxagentFrameBufferPaintWindow(pWin, &temp, what); @@ -2025,14 +2019,13 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) { - RegionRec temp; - /* * The framebuffer operations don't take care of * clipping to the actual area of the framebuffer * so we need to clip ourselves. */ + RegionRec temp; RegionInit(&temp, NullBox, 1); RegionIntersect(&temp, pRegion, &pWin -> borderClip); nxagentFrameBufferPaintWindow(pWin, &temp, what); @@ -2148,8 +2141,6 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo * final region by referring to the first element of the vector. */ - RegionRec temp; - BoxRec box; if (nxagentSessionState != SESSION_DOWN) { @@ -2181,13 +2172,14 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo nxagentExposeArrayIsInitialized = 1; } + RegionRec temp; RegionInit(&temp, (BoxRec *) NULL, 1); if (pRgn != NULL) { if (RegionNumRects(pRgn) > RECTLIMIT) { - box = *RegionExtents(pRgn); + BoxRec box = *RegionExtents(pRgn); RegionEmpty(pRgn); RegionInit(pRgn, &box, 1); @@ -2300,9 +2292,6 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo #ifdef SHAPE static Bool nxagentRegionEqual(RegionPtr pReg1, RegionPtr pReg2) { - BoxPtr pBox1, pBox2; - unsigned int n1, n2; - if (pReg1 == pReg2) { return True; @@ -2313,11 +2302,11 @@ static Bool nxagentRegionEqual(RegionPtr pReg1, RegionPtr pReg2) return False; } - pBox1 = RegionRects(pReg1); - n1 = RegionNumRects(pReg1); + BoxPtr pBox1 = RegionRects(pReg1); + int n1 = RegionNumRects(pReg1); - pBox2 = RegionRects(pReg2); - n2 = RegionNumRects(pReg2); + BoxPtr pBox2 = RegionRects(pReg2); + int n2 = RegionNumRects(pReg2); if (n1 != n2) { @@ -2339,9 +2328,6 @@ static Bool nxagentRegionEqual(RegionPtr pReg1, RegionPtr pReg2) void nxagentShapeWindow(WindowPtr pWin) { - Region reg; - BoxPtr pBox; - if (NXDisplayError(nxagentDisplay) == 1) { return; @@ -2379,8 +2365,8 @@ void nxagentShapeWindow(WindowPtr pWin) RegionCopy(nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(pWin)); - reg = XCreateRegion(); - pBox = RegionRects(nxagentWindowPriv(pWin)->boundingShape); + Region reg = XCreateRegion(); + BoxPtr pBox = RegionRects(nxagentWindowPriv(pWin)->boundingShape); for (int i = 0; i < RegionNumRects(nxagentWindowPriv(pWin)->boundingShape); i++) @@ -2438,8 +2424,8 @@ void nxagentShapeWindow(WindowPtr pWin) RegionCopy(nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin)); - reg = XCreateRegion(); - pBox = RegionRects(nxagentWindowPriv(pWin)->clipShape); + Region reg = XCreateRegion(); + BoxPtr pBox = RegionRects(nxagentWindowPriv(pWin)->clipShape); for (int i = 0; i < RegionNumRects(nxagentWindowPriv(pWin)->clipShape); i++) @@ -2640,8 +2626,7 @@ Bool nxagentDisconnectAllWindows(void) for (int i = 0; i < screenInfo.numScreens; i++) { - WindowPtr pWin = screenInfo.screens[i]->root; - nxagentTraverseWindow( pWin, nxagentDisconnectWindow, &succeeded); + nxagentTraverseWindow(screenInfo.screens[i]->root, nxagentDisconnectWindow, &succeeded); nxagentDefaultWindows[i] = None; } @@ -2706,7 +2691,7 @@ void nxagentDisconnectWindow(void * p0, XID x1, void * p2) if (DeleteProperty(pWin, prop) != Success) { - fprintf(stderr, "nxagentDisconnectWindow: Deleting NX_REAL_WINDOW failed.\n"); + fprintf(stderr, "nxagentDisconnectWindow: Deleting NX_REAL_WINDOW failed.\n"); } #ifdef DEBUG else @@ -3061,7 +3046,6 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer if (nxagentWindowTopLevel(pWin)) { - int ret; Atom type; int format; unsigned long nItems, bytesLeft; @@ -3071,11 +3055,11 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer unsigned char *data64 = NULL; #endif - ret = GetWindowProperty(pWin, - XA_WM_NORMAL_HINTS, - 0, sizeof(XSizeHints), - False, XA_WM_SIZE_HINTS, - &type, &format, &nItems, &bytesLeft, &data); + int ret = GetWindowProperty(pWin, + XA_WM_NORMAL_HINTS, + 0, sizeof(XSizeHints), + False, XA_WM_SIZE_HINTS, + &type, &format, &nItems, &bytesLeft, &data); /* * 72 is the number of bytes returned by @@ -3087,7 +3071,6 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer bytesLeft == 0 && type == XA_WM_SIZE_HINTS) { - XSizeHints *props; #ifdef TEST fprintf(stderr, "nxagentReconnectWindow: setting WMSizeHints on window %p [%lx - %lx].\n", (void*)pWin, pWin -> drawable.id, nxagentWindow(pWin)); @@ -3108,9 +3091,9 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer *(data64 + i) = *(data + i - 4); } - props = (XSizeHints *) data64; + XSizeHints *props = (XSizeHints *) data64; #else - props = (XSizeHints *) data; + XSizeHints *props = (XSizeHints *) data; #endif /* _XSERVER64 */ hints = *props; @@ -3164,15 +3147,14 @@ static void nxagentReconfigureWindowCursor(void * param0, XID param1, void * dat { WindowPtr pWin = (WindowPtr)param0; Bool *pBool = (Bool*)data_buffer; - CursorPtr pCursor; - ScreenPtr pScreen; + CursorPtr pCursor; if (!pWin || !*pBool || !(pCursor = wCursor(pWin))) { return; } - pScreen = pWin -> drawable.pScreen; + ScreenPtr pScreen = pWin -> drawable.pScreen; if (!(nxagentCursorPriv(pCursor, pScreen))) { @@ -3308,27 +3290,23 @@ Bool nxagentCheckIllegalRootMonitoring(WindowPtr pWin, Mask mask) Bool nxagentCheckWindowIntegrity(WindowPtr pWin) { Bool integrity = True; - XImage *image; - char *data; - int format; - unsigned long plane_mask = AllPlanes; - unsigned int width, height, length, depth; - width = pWin -> drawable.width; - height = pWin -> drawable.height; - depth = pWin -> drawable.depth; - format = (depth == 1) ? XYPixmap : ZPixmap; + unsigned int width = pWin -> drawable.width; + unsigned int height = pWin -> drawable.height; + unsigned int depth = pWin -> drawable.depth; + int format = (depth == 1) ? XYPixmap : ZPixmap; if (width && height) { - length = nxagentImageLength(width, height, format, 0, depth); - data = calloc(1, length); + unsigned int length = nxagentImageLength(width, height, format, 0, depth); + char *data = calloc(1, length); if (data == NULL) { FatalError("nxagentCheckWindowIntegrity: Failed to allocate a buffer of size %d.\n", length); } - image = XGetImage(nxagentDisplay, nxagentWindow(pWin), 0, 0, + unsigned long plane_mask = AllPlanes; + XImage *image = XGetImage(nxagentDisplay, nxagentWindow(pWin), 0, 0, width, height, plane_mask, format); if (image == NULL) { @@ -3396,7 +3374,6 @@ Bool nxagentCheckWindowIntegrity(WindowPtr pWin) Bool nxagentIsIconic(WindowPtr pWin) { - int iReturn; unsigned long ulReturnItems; unsigned long ulReturnBytesLeft; Atom atomReturnType; @@ -3408,9 +3385,9 @@ Bool nxagentIsIconic(WindowPtr pWin) return 0; } - iReturn = GetWindowProperty(pWin, MakeAtom("WM_STATE", 8, False), 0, sizeof(CARD32), False, - AnyPropertyType, &atomReturnType, &iReturnFormat, - &ulReturnItems, &ulReturnBytesLeft, &pszReturnData); + int iReturn = GetWindowProperty(pWin, MakeAtom("WM_STATE", 8, False), 0, sizeof(CARD32), False, + AnyPropertyType, &atomReturnType, &iReturnFormat, + &ulReturnItems, &ulReturnBytesLeft, &pszReturnData); if (iReturn == Success) { @@ -3734,7 +3711,6 @@ void nxagentDeleteStaticResizedWindow(unsigned long sequence) StaticResizedWindowStruct *nxagentFindStaticResizedWindow(unsigned long sequence) { - StaticResizedWindowStruct *index; StaticResizedWindowStruct *ret = NULL; if (nxagentStaticResizedWindowList == NULL) @@ -3742,7 +3718,7 @@ StaticResizedWindowStruct *nxagentFindStaticResizedWindow(unsigned long sequence return NULL; } - index = nxagentStaticResizedWindowList; + StaticResizedWindowStruct *index = nxagentStaticResizedWindowList; while (index && index -> sequence > sequence) { -- cgit v1.2.3 From d1e91fae60721687943f622b910221da47df28d2 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 29 Jan 2020 22:49:02 +0100 Subject: Windows.h, Window.c*: reformat comments --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 124 ++++++++++++---------------- 1 file changed, 51 insertions(+), 73 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index a3f3e411a..a898f8592 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -99,8 +99,7 @@ Bool nxagentVisibilityStop = False; #undef DEBUG /* - * Useful to test the window configuration - * failures. + * Useful to test the window configuration failures. */ #ifdef TEST @@ -128,8 +127,7 @@ static int nxagentExposeSerial = 0; StoringPixmapPtr nxagentBSPixmapList[BSPIXMAPLIMIT]; /* - * Used to walk through the window hierarchy - * to find a window + * Used to walk through the window hierarchy to find a window */ typedef struct _WindowMatch @@ -337,9 +335,8 @@ Bool nxagentCreateWindow(WindowPtr pWin) #endif /* - * Select the event mask if window is a top level - * window. This at least makes the keyboard barely - * work. + * Select the event mask if window is a top level window. This at + * least makes the keyboard barely work. */ #ifdef TEST @@ -415,9 +412,8 @@ Bool nxagentCreateWindow(WindowPtr pWin) #endif /* - * Set the WM_DELETE_WINDOW protocols on every - * top level window. Also redirect the window - * if it is a top level. + * Set the WM_DELETE_WINDOW protocols on every top level + * window. Also redirect the window if it is a top level. */ if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) @@ -430,9 +426,8 @@ Bool nxagentCreateWindow(WindowPtr pWin) nxagentAddPropertyToList(prop, pWin); /* - * Redirect the window to the off-screen - * memory, if the composite extension is - * supported on the display. + * Redirect the window to the off-screen memory, if the composite + * extension is supported on the display. */ /* FIXME: Do all the windows for which nxagentWindowTopLevel(pWin) @@ -483,8 +478,7 @@ Bool nxagentCreateWindow(WindowPtr pWin) fbCreateWindow(pWin); /* - * Only the root window will have - * the right colormap. + * Only the root window will have the right colormap. */ if (!pWin->parent) @@ -707,10 +701,9 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) nxagentWMDetect(); /* - * The smart scheduler could be stopped while - * waiting for the reply. In this case we need - * to yield explicitly to avoid to be stuck in - * the dispatch loop forever. + * The smart scheduler could be stopped while waiting for the + * reply. In this case we need to yield explicitly to avoid to be + * stuck in the dispatch loop forever. */ isItTimeToYield = 1; @@ -834,8 +827,8 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) if (i < 100) { /* - * The window manager has done with the reparent - * operation. We can resize and map the window. + * The window manager has done with the reparent operation. We + * can resize and map the window. */ nxagentChangeOption(Fullscreen, True); @@ -879,8 +872,8 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) nxagentOption(RootX), nxagentOption(RootY)); /* - * We disable the screensaver when changing - * mode to fullscreen. Is it really needed? + * We disable the screensaver on the real Xserver when changing mode to + * fullscreen. Is it really needed? */ XSetScreenSaver(nxagentDisplay, 0, 0, DefaultExposures, DefaultBlanking); @@ -1165,11 +1158,10 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift) if (nxagentOption(ClientOs) == ClientOsWinnt) { /* - * If doMove is True we add exposed rectangles - * to the remote expose region. This is done to - * refresh the areas showed newly in the viewport. - * We create two rectangles, one for horizontal - * pan and one for vertical pan. + * If doMove is True we add exposed rectangles to the remote + * expose region. This is done to refresh the areas showed newly + * in the viewport. We create two rectangles, one for + * horizontal pan and one for vertical pan. */ BoxRec hRect = {.x1 = -newX, .y1 = -newY}; @@ -1624,10 +1616,9 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) case BackgroundPixmap: { /* - * If a window background is corrupted, we grant - * its usability by clearing it with a solid co- - * lor. When the pixmap will be fully synchroni- - * zed, an expose will be sent to the window's + * If a window background is corrupted, we grant its usability + * by clearing it with a solid color. When the pixmap will be + * fully synchronized, an expose will be sent to the window's * hierarchy. */ @@ -1645,8 +1636,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) nxagentAllocateCorruptedResource((DrawablePtr) pWin -> background.pixmap, RT_NX_CORR_BACKGROUND); /* - * Clearing the remote background to - * make it usable. + * Clearing the remote background to make it usable. */ nxagentFillRemoteRegion((DrawablePtr) pWin -> background.pixmap, @@ -1708,9 +1698,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) } /* - * As we set this bit, we must change dix in - * order not to perform PositionWindow and let - * X move children windows for us. + * As we set this bit, we must change dix in order not to perform + * PositionWindow and let X move children windows for us. */ if (mask & CWWinGravity) @@ -1719,8 +1708,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) } /* - FIXME: Do we need to set the attribute on the - remote display? + FIXME: Do we need to set the attribute on the remote display? */ if (mask & CWBackingStore) { @@ -1762,8 +1750,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) } /* - FIXME: Do we need to set the attribute on the - remote display? + FIXME: Do we need to set the attribute on the remote display? */ if (mask & CWSaveUnder) { @@ -1789,9 +1776,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) ColormapPtr pCmap = (ColormapPtr) LookupIDByType(wColormap(pWin), RT_COLORMAP); /* - FIXME: When the caller is nxagentReconfigureWindow - sometimes wColormap(pWin) is 0. Could a window - have no colormap? + FIXME: When the caller is nxagentReconfigureWindow sometimes + wColormap(pWin) is 0. Could a window have no colormap? */ if (pCmap != NULL) { @@ -2005,9 +1991,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) #endif /* - * The framebuffer operations don't take care of - * clipping to the actual area of the framebuffer - * so we need to clip ourselves. + * The framebuffer operations don't take care of clipping to the + * actual area of the framebuffer so we need to clip ourselves. */ RegionRec temp; @@ -2020,9 +2005,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) { /* - * The framebuffer operations don't take care of - * clipping to the actual area of the framebuffer - * so we need to clip ourselves. + * The framebuffer operations don't take care of clipping to the + * actual area of the framebuffer so we need to clip ourselves. */ RegionRec temp; @@ -2239,8 +2223,8 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo #endif /* - * Mark this region for sending a synchro, - * in nxagentFlushConfigureWindow(). + * Mark this region for sending a synchro, in + * nxagentFlushConfigureWindow(). */ nxagentExposeQueue.exposures[index].synchronize = 1; @@ -2567,9 +2551,8 @@ void nxagentMapDefaultWindows(void) XMapWindow(nxagentDisplay, nxagentInputWindows[pScreen->myNum]); /* - * At reconnection the Input Window is - * raised in nxagentReconnectAllWindows, - * after the Root Window is mapped. + * At reconnection the Input Window is raised in + * nxagentReconnectAllWindows, after the Root Window is mapped. */ if (nxagentReconnectTrap == 0) @@ -2579,8 +2562,7 @@ void nxagentMapDefaultWindows(void) } /* - * Send a SetSelectionOwner request - * to notify of the agent start. + * Send a SetSelectionOwner request to notify of the agent start. */ XSetSelectionOwner(nxagentDisplay, serverTransToAgentProperty, @@ -2756,9 +2738,8 @@ Bool nxagentReconnectAllWindows(void *p0) } /* - * After the Root Window has - * been mapped, the Input - * Windows is raised. + * After the Root Window has been mapped, the Input Windows is + * raised. */ if (nxagentOption(Rootless) == 0) @@ -2975,14 +2956,12 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer #endif /* - * FIXME: This quick hack is intended to solve a - * problem of NXWin X server for windows. - * The NXWin minimize the windows moving them - * out of the screen area, this behaviour - * can cause problem when a rootless session - * is disconnected and an apps is minimized. - * It will be solved with new Xorg version of - * the NXWin server. + * FIXME: This quick hack is intended to solve a problem of NXWin X + * server for windows. The NXWin minimize the windows moving + * them out of the screen area, this behaviour can cause + * problem when a rootless session is disconnected and an + * apps is minimized. It will be solved with new Xorg + * version of the NXWin server. */ if (nxagentOption(Rootless)) @@ -3025,9 +3004,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer #endif /* - * We have to set the WM_DELETE_WINDOW protocols - * on every top level window, because we don't know - * if a client handles this. + * We have to set the WM_DELETE_WINDOW protocols on every top level + * window, because we don't know if a client handles this. */ if (nxagentOption(Rootless) && (pWin != screenInfo.screens[0]->root)) @@ -3062,8 +3040,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer &type, &format, &nItems, &bytesLeft, &data); /* - * 72 is the number of bytes returned by - * sizeof(XSizeHints) on 32 bit platforms. + * 72 is the number of bytes returned by sizeof(XSizeHints) on + * 32 bit platforms. */ if (ret == Success && -- cgit v1.2.3 From 762bfb50425428dddf5dd7df87836c52d21eb064 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 30 Jan 2020 22:45:18 +0100 Subject: nxagent: Fix double variables nxagentCorrupted* were defined twice! Fixes ArcticaProject/nx-libs#907 (1/3) --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index a898f8592..4885a1957 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -75,12 +75,6 @@ int nxagentWindowPrivateIndex; -/* - * Number of windows which need synchronization. - */ - -int nxagentCorruptedWindows; - /* * Used to track nxagent window's visibility. */ -- cgit v1.2.3 From fdde5b125fb514a3d1db5203bf468ab8e14157a4 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 30 Jan 2020 22:46:40 +0100 Subject: nxagent: move variable definitions from headers to source files Fixes ArcticaProject/nx-libs#907 (2/3) --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 4885a1957..e6b9c03df 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -83,6 +83,9 @@ int nxagentVisibility = VisibilityUnobscured; unsigned long nxagentVisibilityTimeout = 0; Bool nxagentVisibilityStop = False; +ConfiguredWindowStruct *nxagentConfiguredWindowList; +StaticResizedWindowStruct *nxagentStaticResizedWindowList; + /* * Set here the required log level. */ -- cgit v1.2.3