--- xfce4-settings-4.10.0.orig/xfsettingsd/main.c +++ xfce4-settings-4.10.0/xfsettingsd/main.c @@ -97,11 +97,23 @@ dbus_connection_filter_func (DBusConnect DBusMessage *message, void *user_data) { + const char *name, *old, *new; + if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) { - g_printerr (G_LOG_DOMAIN ": %s\n", "Another instance took over. Leaving..."); - gtk_main_quit (); - return DBUS_HANDLER_RESULT_HANDLED; + if (dbus_message_get_args (message, NULL, + DBUS_TYPE_STRING, &name, + DBUS_TYPE_STRING, &old, + DBUS_TYPE_STRING, &new, + DBUS_TYPE_INVALID)) + { + if (!g_strcmp0 (name, XFSETTINGS_DBUS_NAME)) + { + g_printerr (G_LOG_DOMAIN ": %s\n", "Another instance took over. Leaving..."); + gtk_main_quit (); + return DBUS_HANDLER_RESULT_HANDLED; + } + } } return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;