From ddc5a987ce8bee804a83a72049217a6fcc5cf0c4 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Mon, 28 Nov 2016 01:43:25 -0500 Subject: Fix restart loop when started without icons on the desktop Fix for https://github.com/mate-desktop/caja/issues/686 Also checked in XFCE to make sure unkillable caja process did not return Note that the combination of no icons on the desktop with exit on last window will still trigger a restart loop just as it always has --- src/caja-application.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/caja-application.c b/src/caja-application.c index 49958d39..bf8404d9 100644 --- a/src/caja-application.c +++ b/src/caja-application.c @@ -2399,9 +2399,14 @@ caja_application_startup (GApplication *app) { exit_with_last_window = g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_EXIT_WITH_LAST_WINDOW); + /*Keep this inside the running as mate/not as root block */ + /*So other desktop don't get unkillable caja instances holding open */ + instance = g_application_get_default (); + if (exit_with_last_window == FALSE){ + g_application_hold (G_APPLICATION (instance)); + } } - instance = g_application_get_default (); } static void -- cgit v1.2.1