[X2Go-Commits] [nx-libs] 301/429: nxagent: add command line switch to enable composite

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:36:53 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 555cbcb325887b3e19bf7ffc3890f60485681e54
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Mon Mar 29 23:07:18 2021 +0200

    nxagent: add command line switch to enable composite
    
    We have it disabled by default but there hasn't been a way to enable it.
---
 nx-X11/programs/Xserver/composite/compext.c      |  6 ++++++
 nx-X11/programs/Xserver/hw/nxagent/Args.c        | 11 ++++++++++-
 nx-X11/programs/Xserver/hw/nxagent/Options.c     |  2 +-
 nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 |  4 ++--
 nx-X11/programs/Xserver/os/utils.c               |  4 +---
 5 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/nx-X11/programs/Xserver/composite/compext.c b/nx-X11/programs/Xserver/composite/compext.c
index 8513c6d73..a63b02075 100644
--- a/nx-X11/programs/Xserver/composite/compext.c
+++ b/nx-X11/programs/Xserver/composite/compext.c
@@ -39,6 +39,7 @@ static DevPrivateKeyRec CompositeClientPrivateKeyRec;
 
 #define CompositeClientPrivateKey (&CompositeClientPrivateKeyRec)
 #else /* !defined(NXAGENT_SERVER) */
+#include "../hw/nxagent/Options.h"
 static int CompositeClientPrivIndex = -1;
 #endif /* !defined(NXAGENT_SERVER) */
 
@@ -623,6 +624,11 @@ CompositeExtensionInit (void)
     /* Assume initialization is going to fail */
     noCompositeExtension = TRUE;
 
+#ifdef NXAGENT_SERVER
+    if (!nxagentOption(Composite))
+      return;
+#endif
+
     fprintf(stderr, "COMPOSITE: trying to initialize extension.\n");
 
     for (s = 0; s < screenInfo.numScreens; s++) {
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index 9ecf2fb8a..f96c2e238 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -737,6 +737,14 @@ int ddxProcessArgument(int argc, char *argv[], int i)
     return 1;
   }
 
+  /* the composite extension is disabled by default so we provide a
+     way to enable it */
+  if (!strcmp(argv[i], "-composite"))
+  {
+    nxagentChangeOption(Composite, True);
+    return 1;
+  }
+
   if (!strcmp(argv[i], "-nodamage"))
   {
     nxagentChangeOption(UseDamage, False);
@@ -2106,7 +2114,8 @@ void ddxUseMsg(void)
   ErrorF("-sync                  synchronize with the real server\n");
 #ifdef RENDER
   ErrorF("-norender              disable the use of the render extension\n");
-  ErrorF("-nocomposite           disable the use of the composite extension\n");
+  ErrorF("-nocomposite           disable the use of the composite extension (default)\n");
+  ErrorF("-composite             enable the use of the composite extension\n");
 #endif
   ErrorF("-nopersistent          disable disconnection/reconnection to the X display on SIGHUP\n");
   ErrorF("-noshmem               disable use of shared memory extension\n");
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.c b/nx-X11/programs/Xserver/hw/nxagent/Options.c
index afc6899e3..be6e5d5e1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Options.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c
@@ -129,7 +129,7 @@ void nxagentInitOptions(void)
   nxagentOptions.DisplayBuffer  = UNDEFINED;
   nxagentOptions.DisplayCoalescence = 0;
 
-  nxagentOptions.Composite = True;
+  nxagentOptions.Composite = False;
 
   nxagentOptions.IgnoreVisibility = False;
 
diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
index ebc528d37..74349cda7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
+++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
@@ -506,8 +506,8 @@ nx/nx option on session resumption
 .B \-norender
 disable the use of the render extension
 .TP 8
-.B \-nocomposite
-disable the use of the composite extension
+.B \-nocomposite/-composite
+disable/enable the use of the composite extension (default ist disabled)
 .TP 8
 .B \-nopersistent
 disable disconnection/reconnection to the X display on
diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c
index 853a33736..c788fae01 100644
--- a/nx-X11/programs/Xserver/os/utils.c
+++ b/nx-X11/programs/Xserver/os/utils.c
@@ -146,9 +146,7 @@ Bool noTestExtensions;
 Bool noBigReqExtension = FALSE;
 #endif
 #ifdef COMPOSITE
-/* COMPOSITE is disabled by default for now until the
- * interface is stable */
-Bool noCompositeExtension = TRUE;
+Bool noCompositeExtension = FALSE;
 #endif
 #ifdef DAMAGE
 Bool noDamageExtension = FALSE;

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