Bug fix: GPS map not displayed in some circumstances
authorColin Clark <[email protected]>
Sun, 26 Jan 2025 18:29:52 +0000 (18:29 +0000)
committerColin Clark <[email protected]>
Sun, 26 Jan 2025 18:29:52 +0000 (18:29 +0000)
If the user needs to set the override_disable_gpu option, the map will
not be displayed, because the option is set before the standard options
are loaded.

Move the check for override_disable_gpu after the standard options are
loaded.

src/main.cc

index cf14ac3188551f265801a81b06c441bd767393ef..4d8c2f46253b3d13a8af794ab8db1d8bb30a5b46 100644 (file)
@@ -911,30 +911,6 @@ void startup_common(GtkApplication *, gpointer)
        accel_map_load();
 
        command_line = g_new0(CommandLine, 1);
-
-       const gchar *gq_disable_clutter = g_getenv("GQ_DISABLE_CLUTTER");
-
-       if (gq_disable_clutter && (gq_disable_clutter[0] == 'y' || gq_disable_clutter[0] == 'Y'))
-               {
-               options->disable_gpu = TRUE;
-               }
-
-#if HAVE_CLUTTER
-       /** @FIXME For the background of this see:
-        * https://github.com/BestImageViewer/geeqie/issues/397
-        * The feature CLUTTER_FEATURE_SWAP_EVENTS indictates if the
-        * system is liable to exhibit this problem.
-        * The user is provided with an override in Preferences/Behavior
-        */
-       if (!options->override_disable_gpu && !options->disable_gpu)
-               {
-               DEBUG_1("CLUTTER_FEATURE_SWAP_EVENTS %d",clutter_feature_available(CLUTTER_FEATURE_SWAP_EVENTS));
-               if (clutter_feature_available(CLUTTER_FEATURE_SWAP_EVENTS) != 0)
-                       {
-                       options->disable_gpu = TRUE;
-                       }
-               }
-#endif
 }
 
 void activate_cb(GtkApplication *, gpointer)
@@ -980,6 +956,30 @@ void startup_cb(GtkApplication *app, gpointer)
                filter_rebuild();
                }
 
+       const gchar *gq_disable_clutter = g_getenv("GQ_DISABLE_CLUTTER");
+
+       if (gq_disable_clutter && (gq_disable_clutter[0] == 'y' || gq_disable_clutter[0] == 'Y'))
+               {
+               options->disable_gpu = TRUE;
+               }
+
+#if HAVE_CLUTTER
+       /** @FIXME For the background of this see:
+        * https://github.com/BestImageViewer/geeqie/issues/397
+        * The feature CLUTTER_FEATURE_SWAP_EVENTS indictates if the
+        * system is liable to exhibit this problem.
+        * The user is provided with an override in Preferences/Behavior
+        */
+       if (!options->override_disable_gpu && !options->disable_gpu)
+               {
+               DEBUG_1("CLUTTER_FEATURE_SWAP_EVENTS %d",clutter_feature_available(CLUTTER_FEATURE_SWAP_EVENTS));
+               if (clutter_feature_available(CLUTTER_FEATURE_SWAP_EVENTS) != 0)
+                       {
+                       options->disable_gpu = TRUE;
+                       }
+               }
+#endif
+
        /* handle missing config file and commandline additions*/
        if (!layout_window_list)
                {