Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release-src > by-pkgid > d951c9cf0cb0a1339c22e98d1e4186b4 > files > 3

caja-1.8.2-4.mga5.src.rpm

Caja should exit when last window closed on non MATE desktops.
Otherwise it keeps running altough its daemon mode is not needed.
Atilla ÖNTAŞ <tarakbumba at gmail dot com>
Index: caja-1.8.2/src/caja-main.c
===================================================================
--- caja-1.8.2/src/caja-main.c
+++ caja-1.8.2/src/caja-main.c	2015-04-25 03:46:48.170266840 +0300
@@ -502,7 +502,11 @@
     caja_global_preferences_init ();
 
     /* exit_with_last_window being FALSE, caja can run without window. */
-    exit_with_last_window = g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_EXIT_WITH_LAST_WINDOW);
+    /* But we should need this still set as TRUE on other desktop environments. Otherwise caja wont quit */
+    if (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "MATE") == 0)
+    {
+        exit_with_last_window = g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_EXIT_WITH_LAST_WINDOW);
+    }
 
     application = NULL;