[X2Go-Commits] [nx-libs] 41/429: Screen.c: move attributes/valuemask to inner scopes

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:36:03 CEST 2021


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit f534a48601a2b239db48ebb8b984f2951c57dc3e
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Tue May 26 00:51:58 2020 +0200

    Screen.c: move attributes/valuemask to inner scopes
---
 nx-X11/programs/Xserver/hw/nxagent/Screen.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index c7e158636..5c543da19 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -844,8 +844,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen,
   DepthPtr depths;
   int numVisuals, numDepths;
   int depthIndex;
-  unsigned long valuemask;
-  XSetWindowAttributes attributes;
   Bool resetAgentPosition = False;
 
   VisualID defaultVisual;
@@ -1678,15 +1676,16 @@ N/A
   if (nxagentDoFullGeneration == 1 ||
           nxagentReconnectTrap == 1)
   {
-    valuemask = CWBackPixel | CWEventMask | CWColormap |
-                    (nxagentOption(AllScreens) == 1 ? CWOverrideRedirect : 0);
-
-    attributes.background_pixel = nxagentBlackPixel;
-    attributes.event_mask = nxagentGetDefaultEventMask();
-    attributes.colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen));
+    unsigned long valuemask = CWBackPixel | CWEventMask | CWColormap;
+    XSetWindowAttributes attributes = {
+        .background_pixel = nxagentBlackPixel,
+        .event_mask = nxagentGetDefaultEventMask(),
+        .colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen))
+    };
 
     if (nxagentOption(AllScreens) == 1)
     {
+      valuemask |= CWOverrideRedirect;
       attributes.override_redirect = True;
     }
 
@@ -1753,8 +1752,7 @@ N/A
 
       if (nxagentOption(Rootless) == 0)
       {
-        valuemask = CWEventMask;
-        attributes.event_mask = PointerMotionMask;
+        XSetWindowAttributes inpattributes = {.event_mask = PointerMotionMask};
 
         nxagentInputWindows[pScreen->myNum] =
             XCreateWindow(nxagentDisplay,
@@ -1764,7 +1762,7 @@ N/A
                           nxagentOption(Height),
                           0, 0, InputOnly,
                           nxagentDefaultVisual(pScreen),
-                          valuemask , &attributes);
+                          CWEventMask, &inpattributes);
 
         if (nxagentReportWindowIds)
         {

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list