From 8fe2c114084743e8726ae39089e3aa1491d22719 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 9 Feb 2021 19:09:21 +0100 Subject: Use NXAGENT_ONSTART define at more locations marking all the code that is not really required when not using nomachine's nxclient. --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 2 ++ 1 file changed, 2 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 5f12fd48a..00439d2e0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -2575,12 +2575,14 @@ void nxagentMapDefaultWindows(void) } } +#ifdef NXAGENT_ONSTART /* * Send a SetSelectionOwner request to notify of the agent start. */ XSetSelectionOwner(nxagentDisplay, serverTransToAgentProperty, nxagentDefaultWindows[i], CurrentTime); +#endif } /* -- cgit v1.2.3 From 666c4d16aea1f35a50595ef81ab8bb94b23b1097 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 9 Feb 2021 19:38:08 +0100 Subject: nxagent: drop NXAGENT_SHAPE define was never used in the past years, we were always compiling with -DNXAGENT_SHAPE2 --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 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 00439d2e0..0e26a322c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -2079,13 +2079,11 @@ void nxagentClipNotify(WindowPtr pWin, int dx, int dy) nxagentAddConfiguredWindow(pWin, CWStackMode); nxagentAddConfiguredWindow(pWin, CW_Shape); - #ifndef NXAGENT_SHAPE - #ifdef SHAPE - /* - * nxagentShapeWindow(pWin); - */ - #endif /* SHAPE */ - #endif /* NXAGENT_SHAPE */ + #ifdef SHAPE + /* + * nxagentShapeWindow(pWin); + */ + #endif /* SHAPE */ } /* @@ -2378,10 +2376,8 @@ void nxagentShapeWindow(WindowPtr pWin) XUnionRectWithRegion(&rect, reg, reg); } - #ifndef NXAGENT_SHAPE XShapeCombineRegion(nxagentDisplay, nxagentWindow(pWin), ShapeBounding, 0, 0, reg, ShapeSet); - #endif XDestroyRegion(reg); } @@ -2393,10 +2389,8 @@ void nxagentShapeWindow(WindowPtr pWin) RegionEmpty(nxagentWindowPriv(pWin)->boundingShape); - #ifndef NXAGENT_SHAPE XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin), ShapeBounding, 0, 0, None, ShapeSet); - #endif } } @@ -2437,10 +2431,8 @@ void nxagentShapeWindow(WindowPtr pWin) XUnionRectWithRegion(&rect, reg, reg); } - #ifndef NXAGENT_SHAPE XShapeCombineRegion(nxagentDisplay, nxagentWindow(pWin), ShapeClip, 0, 0, reg, ShapeSet); - #endif XDestroyRegion(reg); } @@ -2452,10 +2444,8 @@ void nxagentShapeWindow(WindowPtr pWin) RegionEmpty(nxagentWindowPriv(pWin)->clipShape); - #ifndef NXAGENT_SHAPE XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin), ShapeClip, 0, 0, None, ShapeSet); - #endif } } } -- cgit v1.2.3 From 3fcb7ae3f1bef5eab1b9a284dac24bc5db2aeaca Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 9 Feb 2021 19:40:47 +0100 Subject: nxagent: drop NXAGENT_SHAPE2 define it was the default for years now, so let's drop the define and include the code unconditonally. --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 34 +++++++++-------------------- 1 file changed, 10 insertions(+), 24 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 0e26a322c..6f98ee57b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -471,13 +471,8 @@ Bool nxagentCreateWindow(WindowPtr pWin) } #ifdef SHAPE - #ifdef NXAGENT_SHAPE2 - nxagentWindowPriv(pWin)->boundingShape = NULL; - nxagentWindowPriv(pWin)->clipShape = NULL; - #else - nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1); - nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1); - #endif + nxagentWindowPriv(pWin)->boundingShape = NULL; + nxagentWindowPriv(pWin)->clipShape = NULL; #endif /* SHAPE */ fbCreateWindow(pWin); @@ -583,21 +578,16 @@ Bool nxagentDestroyWindow(WindowPtr pWin) pWindowPriv->siblingAbove; } - #ifdef NXAGENT_SHAPE2 - #ifdef SHAPE - if (pWindowPriv->boundingShape) - { - RegionDestroy(pWindowPriv->boundingShape); - } - - if (pWindowPriv->clipShape) - { - RegionDestroy(pWindowPriv->clipShape); - } - #endif - #else + #ifdef SHAPE + if (pWindowPriv->boundingShape) + { RegionDestroy(pWindowPriv->boundingShape); + } + + if (pWindowPriv->clipShape) + { RegionDestroy(pWindowPriv->clipShape); + } #endif if (pWindowPriv -> corruptedRegion) @@ -2352,12 +2342,10 @@ void nxagentShapeWindow(WindowPtr pWin) RegionNumRects(wBoundingShape(pWin))); #endif - #ifdef NXAGENT_SHAPE2 if (!nxagentWindowPriv(pWin)->boundingShape) { nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1); } - #endif RegionCopy(nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(pWin)); @@ -2407,12 +2395,10 @@ void nxagentShapeWindow(WindowPtr pWin) RegionNumRects(wClipShape(pWin))); #endif - #ifdef NXAGENT_SHAPE2 if (!nxagentWindowPriv(pWin)->clipShape) { nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1); } - #endif RegionCopy(nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin)); -- cgit v1.2.3