- Shutdown cleanly when bus goes away (bug 445898 again)
This commit is contained in:
parent
ff90ce659c
commit
63caf2c86d
@ -207,3 +207,50 @@ diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c b/plugins/a11y-ke
|
|||||||
if (p->slowkeys_alert != NULL)
|
if (p->slowkeys_alert != NULL)
|
||||||
gtk_widget_destroy (p->slowkeys_alert);
|
gtk_widget_destroy (p->slowkeys_alert);
|
||||||
|
|
||||||
|
|
||||||
|
============================================================
|
||||||
|
Shutdown properly when bus goes away
|
||||||
|
|
||||||
|
Previously we were just letting libdbus
|
||||||
|
call exit(1) for us which bypasses the
|
||||||
|
clean up paths.
|
||||||
|
|
||||||
|
diff --git a/gnome-settings-daemon/main.c b/gnome-settings-daemon/main.c
|
||||||
|
--- a/gnome-settings-daemon/main.c
|
||||||
|
+++ b/gnome-settings-daemon/main.c
|
||||||
|
@@ -114,6 +114,21 @@ acquire_name_on_proxy (DBusGProxy *bus_proxy)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static DBusHandlerResult
|
||||||
|
+bus_message_handler (DBusConnection *connection,
|
||||||
|
+ DBusMessage *message,
|
||||||
|
+ void *user_data)
|
||||||
|
+{
|
||||||
|
+ if (dbus_message_is_signal (message,
|
||||||
|
+ DBUS_INTERFACE_LOCAL,
|
||||||
|
+ "Disconnected")) {
|
||||||
|
+ gtk_main_quit ();
|
||||||
|
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static DBusGConnection *
|
||||||
|
get_session_bus (void)
|
||||||
|
{
|
||||||
|
@@ -131,7 +146,12 @@ get_session_bus (void)
|
||||||
|
}
|
||||||
|
|
||||||
|
connection = dbus_g_connection_get_connection (bus);
|
||||||
|
- dbus_connection_set_exit_on_disconnect (connection, TRUE);
|
||||||
|
+ dbus_connection_add_filter (connection,
|
||||||
|
+ (DBusHandleMessageFunction)
|
||||||
|
+ bus_message_handler,
|
||||||
|
+ NULL, NULL);
|
||||||
|
+
|
||||||
|
+ dbus_connection_set_exit_on_disconnect (connection, FALSE);
|
||||||
|
|
||||||
|
out:
|
||||||
|
return bus;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: gnome-settings-daemon
|
Name: gnome-settings-daemon
|
||||||
Version: 2.24.1
|
Version: 2.24.1
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
|
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
|
||||||
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -181,6 +181,9 @@ fi
|
|||||||
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
|
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 10 2008 Ray Strode <rstrode@redhat.com> - 2.24.1-7
|
||||||
|
- Shutdown cleanly when bus goes away (bug 445898 again)
|
||||||
|
|
||||||
* Wed Dec 10 2008 Ray Strode <rstrode@redhat.com> - 2.24.1-6
|
* Wed Dec 10 2008 Ray Strode <rstrode@redhat.com> - 2.24.1-6
|
||||||
- actually apply the patch previoulsy mentioned for bug 474758
|
- actually apply the patch previoulsy mentioned for bug 474758
|
||||||
- Don't map touch pad tap to right-click for left-handed
|
- Don't map touch pad tap to right-click for left-handed
|
||||||
|
Loading…
Reference in New Issue
Block a user