From: Niclas Zeising Date: Mon, 9 Sep 2019 15:46:35 +0000 (+0200) Subject: [PATCH] Deref gui initialization to after options parsing X-Git-Tag: archive/raspbian/1%20201107_dfsg-2+rpi1~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cc3480f9ade7d0ef654de468285777d1a121af4b;p=fontforge.git [PATCH] Deref gui initialization to after options parsing Move GUI initialisation when running with GDK until after options parsing. This way, help messages, version information and so on can be printed even when no gui is around, such as running fontforge -version from a configure script. Forwarded: https://github.com/fontforge/fontforge/pull/3922 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=952408 Applied-Upstream: https://github.com/fontforge/fontforge/commit/ee87536a63534bddc6535d18be793bc19294e274 Gbp-Pq: Name 3000-debian-bug-952408.patch --- diff --git a/fontforgeexe/startui.c b/fontforgeexe/startui.c index 39ff112..ad27cf9 100644 --- a/fontforgeexe/startui.c +++ b/fontforgeexe/startui.c @@ -1099,10 +1099,6 @@ int fontforge_main( int argc, char **argv ) { CheckIsScript(argc,argv); /* Will run the script and exit if it is a script */ /* If there is no UI, there is always a script */ /* and we will never return from the above */ -#ifdef FONTFORGE_CAN_USE_GDK - gdk_init(&argc, &argv); - gdk_set_allowed_backends("win32,quartz,x11"); -#endif if ( load_prefs==NULL || (strcasecmp(load_prefs,"Always")!=0 && /* Already loaded */ strcasecmp(load_prefs,"Never")!=0 )) @@ -1185,7 +1181,10 @@ int fontforge_main( int argc, char **argv ) { } #endif } - +#ifdef FONTFORGE_CAN_USE_GDK + gdk_init(&argc, &argv); + gdk_set_allowed_backends("win32,quartz,x11"); +#endif ensureDotFontForgeIsSetup(); #if defined(__MINGW32__) && !defined(_NO_LIBCAIRO) //Load any custom fonts for the user interface