~ken-vandine/gdm/ubuntu_transition_from_lightdm

« back to all changes in this revision

Viewing changes to debian/patches/94_fix_greeter_not_disappearing.patch

  • Committer: Jeremy Bicha
  • Date: 2017-04-26 11:02:52 UTC
  • Revision ID: jbicha@ubuntu.com-20170426110252-of979orglkl75xgt
Tags: 3.24.1-0ubuntu1
Update to current artful package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From c96060d42ff44359faa92da021bb5b023ac53192 Mon Sep 17 00:00:00 2001
2
 
From: Ray Strode <rstrode@redhat.com>
3
 
Date: Wed, 5 Sep 2012 18:21:35 -0400
4
 
Subject: [PATCH] greeter: explicitly quit when bus goes away
5
 
 
6
 
The process is supposed to get automatically terminated when
7
 
the session bus goes away, but that isn't seemingly working.
8
 
 
9
 
This commit forces it to quit explicitly.
10
 
 
11
 
https://bugzilla.gnome.org/show_bug.cgi?id=683068
12
 
---
13
 
 gui/simple-greeter/greeter-main.c | 5 +++++
14
 
 1 file changed, 5 insertions(+)
15
 
 
16
 
diff --git a/gui/simple-greeter/greeter-main.c b/gui/simple-greeter/greeter-main.c
17
 
index 85d9603..c52af96 100644
18
 
--- a/gui/simple-greeter/greeter-main.c
19
 
+++ b/gui/simple-greeter/greeter-main.c
20
 
@@ -129,32 +129,37 @@ static gboolean
21
 
 session_manager_connect (void)
22
 
 {
23
 
         GError *error;
24
 
 
25
 
         error = NULL;
26
 
 
27
 
         if (bus_connection == NULL) {
28
 
                 bus_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
29
 
                 if (bus_connection == NULL) {
30
 
                         g_message ("Failed to connect to the session bus: %s",
31
 
                                    error->message);
32
 
                         g_error_free (error);
33
 
                         exit (1);
34
 
                 }
35
 
+
36
 
+                g_signal_connect (G_OBJECT (bus_connection),
37
 
+                                  "closed",
38
 
+                                  G_CALLBACK (gtk_main_quit),
39
 
+                                  NULL);
40
 
         }
41
 
 
42
 
         sm_proxy = gsm_manager_proxy_new_sync (bus_connection,
43
 
                                                G_DBUS_PROXY_FLAGS_NONE,
44
 
                                                SM_DBUS_NAME,
45
 
                                                SM_DBUS_PATH,
46
 
                                                NULL,
47
 
                                                &error);
48
 
 
49
 
         if (sm_proxy == NULL) {
50
 
                 g_message ("Failed to connect to the session manager: %s",
51
 
                            error->message);
52
 
                 g_error_free (error);
53
 
         }
54
 
 
55
 
         return (sm_proxy != NULL);
56
 
 }