[X2Go-Commits] [nx-libs] 22/429: Display.c: factor out confinement window creation

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:36:00 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 abe5e8479aca9f53ed4778336978bf7bd623c56a
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Fri May 15 18:25:07 2020 +0200

    Display.c: factor out confinement window creation
---
 nx-X11/programs/Xserver/hw/nxagent/Display.c | 54 +++++++++++++---------------
 1 file changed, 24 insertions(+), 30 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 55e40b461..2db83e9db 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -1105,6 +1105,28 @@ void nxagentResetSignalHandlers(void)
   nxagentInitTimer();
 }
 
+/*
+ * currently unused it seems
+ */
+void nxagentOpenConfineWindow(void)
+{
+  nxagentConfineWindow = XCreateWindow(nxagentDisplay,
+                                       DefaultRootWindow(nxagentDisplay),
+                                       0, 0, 1, 1, 0, 0,
+                                       InputOnly,
+                                       CopyFromParent,
+                                       0L, NULL);
+
+  if (nxagentReportWindowIds) {
+    fprintf(stderr, "NXAGENT_WINDOW_ID: CONFINEMENT_WINDOW,WID:[0x%x]\n",
+              nxagentConfineWindow);
+  }
+
+  #ifdef TEST
+  fprintf(stderr, "%s: Created agent's confine window with id [0x%x].\n", __func__, nxagentConfineWindow);
+  #endif
+}
+
 void nxagentOpenDisplay(int argc, char *argv[])
 {
   if (!nxagentDoFullGeneration)
@@ -1298,21 +1320,7 @@ FIXME: Use of nxagentParentWindow is strongly deprecated.  We need
   fprintf(stderr, "nxagentOpenDisplay: Going to create agent's confine window.\n");
   #endif
 
-  nxagentConfineWindow = XCreateWindow(nxagentDisplay,
-                                       DefaultRootWindow(nxagentDisplay),
-                                       0, 0, 1, 1, 0, 0,
-                                       InputOnly,
-                                       CopyFromParent,
-                                       0L, NULL);
-
-  if (nxagentReportWindowIds) {
-    fprintf(stderr, "NXAGENT_WINDOW_ID: CONFINEMENT_WINDOW,WID:[0x%x]\n",
-              nxagentConfineWindow);
-  }
-  #ifdef TEST
-  fprintf(stderr, "nxagentOpenDisplay: Created agent's confine window with id [0x%x].\n",
-              nxagentConfineWindow);
-  #endif
+  nxagentOpenConfineWindow();
 
   if (!(nxagentUserGeometry.flag & XValue))
   {
@@ -2665,21 +2673,7 @@ Bool nxagentReconnectDisplay(void *p0)
   fprintf(stderr, "nxagentReconnectDisplay: Going to create agent's confine window.\n");
   #endif
 
-  nxagentConfineWindow = XCreateWindow(nxagentDisplay,
-                                       DefaultRootWindow(nxagentDisplay),
-                                       0, 0, 1, 1, 0, 0,
-                                       InputOnly,
-                                       CopyFromParent,
-                                       0L, NULL);
-
-  if (nxagentReportWindowIds) {
-    fprintf(stderr, "NXAGENT_WINDOW_ID: CONFINEMENT_WINDOW,WID:[0x%x]\n",
-              nxagentConfineWindow);
-  }
-  #ifdef TEST
-  fprintf(stderr, "nxagentReconnectDisplay: Created agent's confine window with id [0x%x].\n",
-              nxagentConfineWindow);
-  #endif
+  nxagentOpenConfineWindow();
 
   useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape);
 

--
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