xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 29 10:08:05 UTC 2021


 hw/xwayland/man/Xwayland.man |    9 +++++++++
 hw/xwayland/xwayland.c       |   17 +++++++++++++++++
 hw/xwayland/xwayland.pc.in   |    1 +
 3 files changed, 27 insertions(+)

New commits:
commit 4341f1da728e4c67187b48865faf06c1312bcdff
Author: Misha Gusarov <dottedmag at dottedmag.net>
Date:   Wed Jan 27 12:37:51 2021 +0000

    xwayland: Add -verbose option as in xfree86
    
    Makes it easier to debug Xwayland problems.
    
    Signed-off-by: Misha Gusarov <dottedmag at dottedmag.net>

diff --git a/hw/xwayland/man/Xwayland.man b/hw/xwayland/man/Xwayland.man
index c5e59c365..a3e04c74b 100644
--- a/hw/xwayland/man/Xwayland.man
+++ b/hw/xwayland/man/Xwayland.man
@@ -75,6 +75,15 @@ to be an X window manager as well.
 Force the shared memory backend instead of glamor (if available) for passing
 buffers to the Wayland server.
 .TP 8
+.BR \-verbose " [\fIn\fP]"
+Sets the verbosity level for information printed on stderr.  If the
+.I n
+value isn't supplied, each occurrence of this option increments the
+verbosity level.  When the
+.I n
+value is supplied, the verbosity level is set to that value.  The default
+verbosity level is 0.
+.TP 8
 .BI \-version
 Show the server version and exit.
 .TP 8
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 9fc3db976..b11e2020c 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -93,6 +93,7 @@ ddxUseMsg(void)
     ErrorF("-eglstream             use eglstream backend for nvidia GPUs\n");
 #endif
     ErrorF("-shm                   use shared memory for passing buffers\n");
+    ErrorF("-verbose [n]           verbose startup messages\n");
     ErrorF("-version               show the server version and exit\n");
 }
 
@@ -100,6 +101,7 @@ static int init_fd = -1;
 static int wm_fd = -1;
 static int listen_fds[5] = { -1, -1, -1, -1, -1 };
 static int listen_fd_count = 0;
+static int verbosity = 0;
 
 static void
 xwl_show_version(void)
@@ -161,6 +163,21 @@ ddxProcessArgument(int argc, char *argv[], int i)
     else if (strcmp(argv[i], "-shm") == 0) {
         return 1;
     }
+    else if (strcmp(argv[i], "-verbose") == 0) {
+        if (++i < argc && argv[i]) {
+            char *end;
+            long val;
+
+            val = strtol(argv[i], &end, 0);
+            if (*end == '\0') {
+                verbosity = val;
+                LogSetParameter(XLOG_VERBOSITY, verbosity);
+                return 2;
+            }
+        }
+        LogSetParameter(XLOG_VERBOSITY, ++verbosity);
+        return 1;
+    }
     else if (strcmp(argv[i], "-eglstream") == 0) {
         return 1;
     }
diff --git a/hw/xwayland/xwayland.pc.in b/hw/xwayland/xwayland.pc.in
index b82a4fd56..c42435fb7 100644
--- a/hw/xwayland/xwayland.pc.in
+++ b/hw/xwayland/xwayland.pc.in
@@ -6,3 +6,4 @@ have_glamor=@have_glamor@
 have_eglstream=@have_eglstream@
 have_initfd=true
 have_listenfd=true
+have_verbose=true


More information about the xorg-commit mailing list