Part fix #796: Restored windows all show the same location
authorColin Clark <colin.clark@cclark.uk>
Mon, 17 Aug 2020 14:33:33 +0000 (15:33 +0100)
committerColin Clark <colin.clark@cclark.uk>
Mon, 17 Aug 2020 14:33:33 +0000 (15:33 +0100)
https://github.com/BestImageViewer/geeqie/issues/796

If multiple windows are defined in the config. file, command line
options are used only in the main window.

src/layout.c

index 91419f4..2b535dc 100644 (file)
@@ -2900,7 +2900,10 @@ LayoutWindow *layout_new_from_config(const gchar **attribute_names, const gchar
 
        if (attribute_names) layout_load_attributes(&lop, attribute_names, attribute_values);
 
-       if (use_commandline)
+       /* If multiple windows are specified in the config. file,
+        * use the command line options only in the main window.
+        */
+       if (use_commandline && (g_strcmp0(lop.id, "main") == 0))
                {
                layout_config_commandline(&lop, &path);
                }