From 38fb5456d0d2909609deefe9c950c31bb33dca54 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Wed, 9 Sep 2020 00:58:36 +0200 Subject: [PATCH] Allow lefty -? to show usage even if there's no DISPLAY (FEATURE_X11) Parse lefty args before starting app and trying to open DISPLAY. This allows testing that lefty can start in CI. This change only affects the X11 variant (FEATURE_X11 or FEATURE_NONE defined), not the Windows variant. --- cmd/lefty/lefty.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/lefty/lefty.c b/cmd/lefty/lefty.c index 0b3a0edd2..633d9a20a 100644 --- a/cmd/lefty/lefty.c +++ b/cmd/lefty/lefty.c @@ -102,6 +102,11 @@ int main (int argc, char **argv) { exprstr = NULL; fp = NULL; init (argv[0]); + + processstr (leftyoptions); + argv++, argc--; + processargs (argc, argv); + Minit (GFXprune); Ginit (); FD_SET (Gxfd, &inputfds); @@ -111,10 +116,6 @@ int main (int argc, char **argv) { Eshowbody = 1; Eshowcalls = 1; - processstr (leftyoptions); - argv++, argc--; - processargs (argc, argv); - if (setjmp (exitljbuf)) goto eop; -- 2.50.1