fix some registration corner cases

This commit is contained in:
Matthias Clasen 2008-11-10 19:07:02 +00:00
parent 867b3af997
commit ca6970aca7
2 changed files with 28 additions and 1 deletions

View File

@ -12,7 +12,7 @@
Summary: GNOME session manager
Name: gnome-session
Version: 2.24.1
Release: 3%{?dist}
Release: 4%{?dist}
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/gnome-session/2.24/%{name}-%{version}.tar.bz2
Source1: redhat-default-session
@ -70,6 +70,9 @@ Patch9: gnome-session-2.24.0-add-can-shutdown-api.patch
# fixed upstream
Patch10: resizable.patch
# fixed upstream
Patch11: registration.patch
%description
gnome-session manages a GNOME desktop or GDM login session. It starts up the other core
GNOME components and handles logout and saving the session.
@ -86,6 +89,7 @@ Desktop file to add GNOME to display manager session menu.
%setup -q
%patch9 -p1 -b .add-can-shutdown-api
%patch10 -p1 -b .resizable
%patch11 -p1 -b .registration
%build
@ -187,6 +191,9 @@ fi
%changelog
* Mon Nov 10 2008 Matthias Clasen <mclasen@redhat.com> - 2.24.1-4
- Fix client registration in some cases
* Sun Oct 26 2008 Matthias Clasen <mclasen@redhat.com> - 2.24.1-3
- Make the capplet resizable (#468577)

20
registration.patch Normal file
View File

@ -0,0 +1,20 @@
diff -up gnome-session-2.24.1/gnome-session/gsm-manager.c.registration gnome-session-2.24.1/gnome-session/gsm-manager.c
--- gnome-session-2.24.1/gnome-session/gsm-manager.c.registration 2008-11-10 13:54:08.000000000 -0500
+++ gnome-session-2.24.1/gnome-session/gsm-manager.c 2008-11-10 14:01:41.000000000 -0500
@@ -2436,13 +2436,10 @@ gsm_manager_register_client (GsmManager
g_debug ("GsmManager: Adding new client %s to session", new_startup_id);
- if (IS_STRING_EMPTY (startup_id) && IS_STRING_EMPTY (app_id)) {
- /* just accept the client - we can't associate with an
- existing App */
- app = NULL;
- } else if (IS_STRING_EMPTY (startup_id)) {
+ if (app == NULL && !IS_STRING_EMPTY (startup_id)) {
app = find_app_for_startup_id (manager, startup_id);
- } else if (IS_STRING_EMPTY (startup_id)) {
+ }
+ if (app == NULL && !IS_STRING_EMPTY (app_id)) {
/* try to associate this app id with a known app */
app = find_app_for_app_id (manager, app_id);
}