r25480 - in /desktop/unstable/gdm3/debian: changelog patches/20_endsession_respawn.patch
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Sat Nov 6 08:16:14 UTC 2010
Author: joss
Date: Sat Nov 6 08:16:13 2010
New Revision: 25480
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=25480
Log:
* 20_endsession_respawn.patch:
+ Correctly reinitialize the variable that tells a display must
respawn. It badly broke when trying to use an already used
display to switch to another one. Closes: #600706.
+ Also prevent respawning for static displays, otherwise the same
problem will also happen on :0. The only remaining difference
remaining between static and transient displays is autologin
handling.
+ Don’t restart the static display when it exits, that would make
the previous change moot.
Modified:
desktop/unstable/gdm3/debian/changelog
desktop/unstable/gdm3/debian/patches/20_endsession_respawn.patch
Modified: desktop/unstable/gdm3/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gdm3/debian/changelog?rev=25480&op=diff
==============================================================================
--- desktop/unstable/gdm3/debian/changelog [utf-8] (original)
+++ desktop/unstable/gdm3/debian/changelog [utf-8] Sat Nov 6 08:16:13 2010
@@ -2,8 +2,18 @@
* 27_orca_braille.patch: patch from Samuel Thibault to enable braille
support in orca. Closes: #600472.
-
- -- Josselin Mouette <joss at debian.org> Tue, 19 Oct 2010 08:35:37 +0200
+ * 20_endsession_respawn.patch:
+ + Correctly reinitialize the variable that tells a display must
+ respawn. It badly broke when trying to use an already used
+ display to switch to another one. Closes: #600706.
+ + Also prevent respawning for static displays, otherwise the same
+ problem will also happen on :0. The only remaining difference
+ remaining between static and transient displays is autologin
+ handling.
+ + Don’t restart the static display when it exits, that would make
+ the previous change moot.
+
+ -- Josselin Mouette <joss at debian.org> Sat, 06 Nov 2010 08:39:46 +0100
gdm3 (2.30.5-4) unstable; urgency=low
Modified: desktop/unstable/gdm3/debian/patches/20_endsession_respawn.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gdm3/debian/patches/20_endsession_respawn.patch?rev=25480&op=diff
==============================================================================
--- desktop/unstable/gdm3/debian/patches/20_endsession_respawn.patch [utf-8] (original)
+++ desktop/unstable/gdm3/debian/patches/20_endsession_respawn.patch [utf-8] Sat Nov 6 08:16:13 2010
@@ -1,63 +1,84 @@
Index: gdm-2.30.5/daemon/gdm-display.c
===================================================================
---- gdm-2.30.5.orig/daemon/gdm-display.c 2010-10-05 20:23:10.783426269 +0200
-+++ gdm-2.30.5/daemon/gdm-display.c 2010-10-05 20:23:12.211429828 +0200
-@@ -340,6 +340,32 @@ gdm_display_set_slave_bus_name (GdmDispl
+--- gdm-2.30.5.orig/daemon/gdm-display.c 2010-11-06 08:30:07.848208636 +0100
++++ gdm-2.30.5/daemon/gdm-display.c 2010-11-06 08:32:50.492212618 +0100
+@@ -70,6 +70,7 @@ struct GdmDisplayPrivate
+ gboolean is_local;
+ gboolean is_nested;
+ guint finish_idle_id;
++ gboolean needs_respawn;
+
+ GdmSlaveProxy *slave_proxy;
+ DBusGConnection *connection;
+@@ -340,6 +341,20 @@ gdm_display_set_slave_bus_name (GdmDispl
return ret;
}
-+static gboolean
-+gdm_display_real_set_needs_respawn (GdmDisplay *display,
-+ gboolean respawn,
-+ GError **error)
-+{
-+ return TRUE;
-+}
-+
+gboolean
+gdm_display_set_needs_respawn (GdmDisplay *display,
+ gboolean respawn,
+ GError **error)
+{
-+ gboolean ret;
-+
+ g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
+
+ g_debug ("GdmDisplay: %s respawn on display %s", respawn?"Enabling":"Disabling", display->priv->x11_display_name);
+
-+ g_object_ref (display);
-+ ret = GDM_DISPLAY_GET_CLASS (display)->set_needs_respawn (display, respawn, error);
-+ g_object_unref (display);
-+
-+ return ret;
++ display->priv->needs_respawn = respawn;
++
++ return TRUE;
+}
+
static void
gdm_display_real_get_timed_login_details (GdmDisplay *display,
gboolean *enabledp,
-@@ -1139,6 +1165,7 @@ gdm_display_class_init (GdmDisplayClass
- klass->add_user_authorization = gdm_display_real_add_user_authorization;
- klass->remove_user_authorization = gdm_display_real_remove_user_authorization;
- klass->set_slave_bus_name = gdm_display_real_set_slave_bus_name;
-+ klass->set_needs_respawn = gdm_display_real_set_needs_respawn;
- klass->get_timed_login_details = gdm_display_real_get_timed_login_details;
- klass->prepare = gdm_display_real_prepare;
- klass->manage = gdm_display_real_manage;
+@@ -766,6 +781,34 @@ gdm_display_unmanage (GdmDisplay *displa
+ }
+
+ gboolean
++gdm_display_respawn_or_finish (GdmDisplay *display)
++{
++ g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
++
++ if (display->priv->needs_respawn) {
++ int status;
++
++ g_debug ("GdmDisplay: respawning display %s", display->priv->x11_display_name);
++ display->priv->needs_respawn = FALSE;
++
++ gdm_display_unmanage (display);
++
++ status = gdm_display_get_status (display);
++ if (status != GDM_DISPLAY_FAILED) {
++ gdm_display_manage (display);
++ }
++ } else {
++ /* Since this is called from the children's finish,
++ don't call it again, only call real_finish. */
++ gdm_display_real_finish (display);
++
++ gdm_display_unmanage (display);
++ }
++
++ return TRUE;
++}
++
++gboolean
+ gdm_display_get_id (GdmDisplay *display,
+ char **id,
+ GError **error)
Index: gdm-2.30.5/daemon/gdm-display.h
===================================================================
---- gdm-2.30.5.orig/daemon/gdm-display.h 2010-10-05 20:23:10.751427020 +0200
-+++ gdm-2.30.5/daemon/gdm-display.h 2010-10-05 20:23:12.211429828 +0200
-@@ -66,6 +66,9 @@ typedef struct
- gboolean (*set_slave_bus_name) (GdmDisplay *display,
- const char *name,
- GError **error);
-+ gboolean (*set_needs_respawn) (GdmDisplay *display,
-+ gboolean respawn,
-+ GError **error);
- gboolean (*prepare) (GdmDisplay *display);
- gboolean (*manage) (GdmDisplay *display);
- gboolean (*finish) (GdmDisplay *display);
-@@ -150,6 +153,9 @@ gboolean gdm_display_get_user
+--- gdm-2.30.5.orig/daemon/gdm-display.h 2010-11-06 08:30:07.848208636 +0100
++++ gdm-2.30.5/daemon/gdm-display.h 2010-11-06 08:30:08.312210692 +0100
+@@ -96,6 +96,7 @@ gboolean gdm_display_prepare
+ gboolean gdm_display_manage (GdmDisplay *display);
+ gboolean gdm_display_finish (GdmDisplay *display);
+ gboolean gdm_display_unmanage (GdmDisplay *display);
++gboolean gdm_display_respawn_or_finish (GdmDisplay *display);
+
+
+ /* exported to bus */
+@@ -150,6 +151,9 @@ gboolean gdm_display_get_user
gboolean gdm_display_set_slave_bus_name (GdmDisplay *display,
const char *name,
GError **error);
@@ -69,8 +90,8 @@
G_END_DECLS
Index: gdm-2.30.5/daemon/gdm-display.xml
===================================================================
---- gdm-2.30.5.orig/daemon/gdm-display.xml 2010-10-05 20:23:10.723424436 +0200
-+++ gdm-2.30.5/daemon/gdm-display.xml 2010-10-05 20:23:12.211429828 +0200
+--- gdm-2.30.5.orig/daemon/gdm-display.xml 2010-11-06 08:30:07.852209703 +0100
++++ gdm-2.30.5/daemon/gdm-display.xml 2010-11-06 08:30:08.312210692 +0100
@@ -45,6 +45,9 @@
<method name="SetSlaveBusName">
<arg name="name" direction="in" type="s"/>
@@ -83,9 +104,9 @@
<arg name="username" direction="out" type="s"/>
Index: gdm-2.30.5/daemon/gdm-simple-slave.c
===================================================================
---- gdm-2.30.5.orig/daemon/gdm-simple-slave.c 2010-10-05 20:23:10.699432697 +0200
-+++ gdm-2.30.5/daemon/gdm-simple-slave.c 2010-10-05 20:23:12.211429828 +0200
-@@ -109,6 +109,9 @@ on_session_started (GdmSession *se
+--- gdm-2.30.5.orig/daemon/gdm-simple-slave.c 2010-11-06 08:30:08.268209705 +0100
++++ gdm-2.30.5/daemon/gdm-simple-slave.c 2010-11-06 08:30:08.312210692 +0100
+@@ -108,6 +108,9 @@ on_session_started (GdmSession *se
g_debug ("GdmSimpleSlave: session started %d", pid);
@@ -97,8 +118,8 @@
if (username != NULL) {
Index: gdm-2.30.5/daemon/gdm-slave.c
===================================================================
---- gdm-2.30.5.orig/daemon/gdm-slave.c 2010-10-05 20:23:10.671433534 +0200
-+++ gdm-2.30.5/daemon/gdm-slave.c 2010-10-05 20:24:31.927428921 +0200
+--- gdm-2.30.5.orig/daemon/gdm-slave.c 2010-11-06 08:30:07.852209703 +0100
++++ gdm-2.30.5/daemon/gdm-slave.c 2010-11-06 08:30:08.316207360 +0100
@@ -559,6 +559,37 @@ gdm_slave_set_slave_bus_name (GdmSlave *
return res;
}
@@ -139,8 +160,8 @@
{
Index: gdm-2.30.5/daemon/gdm-slave.h
===================================================================
---- gdm-2.30.5.orig/daemon/gdm-slave.h 2010-10-05 20:23:10.643431438 +0200
-+++ gdm-2.30.5/daemon/gdm-slave.h 2010-10-05 20:23:12.215429429 +0200
+--- gdm-2.30.5.orig/daemon/gdm-slave.h 2010-08-11 16:19:44.000000000 +0200
++++ gdm-2.30.5/daemon/gdm-slave.h 2010-11-06 08:30:08.316207360 +0100
@@ -72,6 +72,9 @@ gboolean gdm_slave_add_user_a
gboolean gdm_slave_switch_to_user_session (GdmSlave *slave,
const char *username);
@@ -153,71 +174,63 @@
gboolean gdm_slave_run_script (GdmSlave *slave,
Index: gdm-2.30.5/daemon/gdm-transient-display.c
===================================================================
---- gdm-2.30.5.orig/daemon/gdm-transient-display.c 2010-10-05 20:23:10.615426407 +0200
-+++ gdm-2.30.5/daemon/gdm-transient-display.c 2010-10-05 20:23:12.215429429 +0200
-@@ -45,7 +45,7 @@
-
- struct GdmTransientDisplayPrivate
- {
-- gpointer dummy;
-+ gboolean needs_respawn;
- };
-
- enum {
-@@ -86,6 +86,20 @@ gdm_transient_display_remove_user_author
- }
-
- static gboolean
-+gdm_transient_display_set_needs_respawn (GdmDisplay *display,
-+ gboolean respawn,
-+ GError **error)
-+{
-+ g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
-+
-+ GDM_DISPLAY_CLASS (gdm_transient_display_parent_class)->set_needs_respawn (display, respawn, error);
-+
-+ GDM_TRANSIENT_DISPLAY (display)->priv->needs_respawn = respawn;
-+
-+ return TRUE;
-+}
-+
-+static gboolean
- gdm_transient_display_manage (GdmDisplay *display)
+--- gdm-2.30.5.orig/daemon/gdm-transient-display.c 2010-08-11 16:19:44.000000000 +0200
++++ gdm-2.30.5/daemon/gdm-transient-display.c 2010-11-06 08:30:08.316207360 +0100
+@@ -100,12 +100,9 @@ gdm_transient_display_finish (GdmDisplay
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
-@@ -100,10 +114,24 @@ gdm_transient_display_finish (GdmDisplay
- {
- g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
- GDM_DISPLAY_CLASS (gdm_transient_display_parent_class)->finish (display);
-+ if (GDM_TRANSIENT_DISPLAY (display)->priv->needs_respawn) {
-+ int status;
++ /* Only respawn if needed. */
- /* we don't restart/remanage transient displays */
- gdm_display_unmanage (display);
-+ /* If we were told to respawn, don't call parent's
-+ finish since we don't want to be put in the
-+ FINISHED state */
-+
-+ gdm_display_unmanage (display);
-+
-+ status = gdm_display_get_status (display);
-+ if (status != GDM_DISPLAY_FAILED) {
-+ gdm_display_manage (display);
-+ }
-+ } else {
-+ GDM_DISPLAY_CLASS (gdm_transient_display_parent_class)->finish (display);
-+
-+ gdm_display_unmanage (display);
-+ }
-
- return TRUE;
- }
-@@ -168,6 +196,7 @@ gdm_transient_display_class_init (GdmTra
- display_class->create_authority = gdm_transient_display_create_authority;
- display_class->add_user_authorization = gdm_transient_display_add_user_authorization;
- display_class->remove_user_authorization = gdm_transient_display_remove_user_authorization;
-+ display_class->set_needs_respawn = gdm_transient_display_set_needs_respawn;
- display_class->manage = gdm_transient_display_manage;
- display_class->finish = gdm_transient_display_finish;
- display_class->unmanage = gdm_transient_display_unmanage;
+-
+- return TRUE;
++ return gdm_display_respawn_or_finish (display);
+ }
+
+ static gboolean
+Index: gdm-2.30.5/daemon/gdm-static-display.c
+===================================================================
+--- gdm-2.30.5.orig/daemon/gdm-static-display.c 2010-08-11 16:19:44.000000000 +0200
++++ gdm-2.30.5/daemon/gdm-static-display.c 2010-11-06 08:30:08.316207360 +0100
+@@ -98,22 +98,13 @@ gdm_static_display_manage (GdmDisplay *d
+ static gboolean
+ gdm_static_display_finish (GdmDisplay *display)
+ {
+- int status;
+-
+ g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
+
+- /* Don't call parent's finish since we don't ever
+- want to be put in the FINISHED state */
+-
+- /* restart static displays */
+- gdm_display_unmanage (display);
+-
+- status = gdm_display_get_status (display);
+- if (status != GDM_DISPLAY_FAILED) {
+- gdm_display_manage (display);
+- }
++ /* Only respawn if needed, even for static displays.
++ Avoids the case where :0 keeps respawning while
++ used for switching to an existing session in e.g. :1. */
+
+- return TRUE;
++ return gdm_display_respawn_or_finish (display);
+ }
+
+ static gboolean
+Index: gdm-2.30.5/daemon/gdm-local-display-factory.c
+===================================================================
+--- gdm-2.30.5.orig/daemon/gdm-local-display-factory.c 2010-11-06 08:30:07.848208636 +0100
++++ gdm-2.30.5/daemon/gdm-local-display-factory.c 2010-11-06 08:30:08.316207360 +0100
+@@ -431,7 +431,6 @@ on_static_display_status_changed (GdmDis
+ gdm_display_store_remove (store, display);
+ /* reset num failures */
+ factory->priv->num_failures = 0;
+- create_display (factory);
+ break;
+ case GDM_DISPLAY_FAILED:
+ /* leave the display number in factory->priv->displays
More information about the pkg-gnome-commits
mailing list