rpms/gdm/F-11 session-client.patch,NONE,1.1 gdm.spec,1.465,1.466
Matthias Clasen
mclasen at fedoraproject.org
Sat Apr 25 00:55:32 UTC 2009
Author: mclasen
Update of /cvs/pkgs/rpms/gdm/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5393
Modified Files:
gdm.spec
Added Files:
session-client.patch
Log Message:
fix a problem with shutdown from the login screen
session-client.patch:
--- NEW FILE session-client.patch ---
--- gdm-2.26.1/gui/simple-greeter/greeter-main.c 2009-02-19 21:45:09.000000000 -0500
+++ hacked/gui/simple-greeter/greeter-main.c 2009-04-24 20:21:43.560229712 -0400
@@ -155,6 +155,46 @@
return (sm_proxy != NULL);
}
+static void
+stop_cb (gpointer data)
+{
+ gtk_main_quit ();
+}
+
+static gboolean
+end_session_response (gboolean is_okay, const gchar *reason)
+{
+ gboolean ret;
+ GError *error = NULL;
+
+ ret = dbus_g_proxy_call (client_proxy, "EndSessionResponse",
+ &error,
+ G_TYPE_BOOLEAN, is_okay,
+ G_TYPE_STRING, reason,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID);
+
+ if (!ret) {
+ g_warning ("Failed to send session response %s", error->message);
+ g_error_free (error);
+ }
+
+ return ret;
+}
+
+static void
+query_end_session_cb (guint flags, gpointer data)
+{
+ end_session_response (TRUE, NULL);
+}
+
+static void
+end_session_cb (guint flags, gpointer data)
+{
+ end_session_response (TRUE, NULL);
+ gtk_main_quit ();
+}
+
static gboolean
register_client (void)
{
@@ -186,6 +226,19 @@
SM_DBUS_NAME,
client_id,
SM_CLIENT_DBUS_INTERFACE);
+
+ dbus_g_proxy_add_signal (client_proxy, "Stop", G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (client_proxy, "Stop",
+ G_CALLBACK (stop_cb), NULL, NULL);
+
+ dbus_g_proxy_add_signal (client_proxy, "QueryEndSession", G_TYPE_UINT, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (client_proxy, "QueryEndSession",
+ G_CALLBACK (query_end_session_cb), NULL, NULL);
+
+ dbus_g_proxy_add_signal (client_proxy, "EndSession", G_TYPE_UINT, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (client_proxy, "EndSession",
+ G_CALLBACK (end_session_cb), NULL, NULL);
+
g_unsetenv ("DESKTOP_AUTOSTART_ID");
return TRUE;
Index: gdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdm/F-11/gdm.spec,v
retrieving revision 1.465
retrieving revision 1.466
diff -u -r1.465 -r1.466
--- gdm.spec 22 Apr 2009 14:21:38 -0000 1.465
+++ gdm.spec 25 Apr 2009 00:55:02 -0000 1.466
@@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.26.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@@ -98,6 +98,9 @@
Patch19: gdm-2.26.1-multistack.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=580189
+Patch20: session-client.patch
+
# Fedora-specific
Patch99: gdm-2.23.1-fedora-logo.patch
@@ -140,6 +143,8 @@
%patch19 -p1 -b .multistack
+%patch20 -p1 -b .session-client
+
%patch99 -p1 -b .fedora-logo
autoreconf -i -f
@@ -380,6 +385,9 @@
%{_libdir}/gdm/simple-greeter/plugins/fingerprint.so
%changelog
+* Fri Apr 24 2009 Matthias Clasen <mclasen at redhat.com> - 1:2.26.1-4
+- Make the greeter a well-behaved session client (#495738)
+
* Wed Apr 22 2009 Ray Strode <rstrode at redhat.com> - 1:2.26.1-3
- Add temporary hack to smack down misbehaving PAM modules
More information about the scm-commits
mailing list