summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2010-01-16 21:54:13 +0000
committerPacho Ramos <pacho@gentoo.org>2010-01-16 21:54:13 +0000
commitde7ba6bc6d3b5054b2b5412c770f2956451ed022 (patch)
treec6320b2bc4db126aadf109ed8844b6f36ff77170 /gnome-extra/gnome-screensaver/files
parentVersion bump (diff)
downloadgentoo-2-de7ba6bc6d3b5054b2b5412c770f2956451ed022.tar.gz
gentoo-2-de7ba6bc6d3b5054b2b5412c770f2956451ed022.tar.bz2
gentoo-2-de7ba6bc6d3b5054b2b5412c770f2956451ed022.zip
Upstream patch for fixing upstream bug 577133
(Portage version: 2.1.7.16/cvs/Linux x86_64)
Diffstat (limited to 'gnome-extra/gnome-screensaver/files')
-rw-r--r--gnome-extra/gnome-screensaver/files/gnome-screensaver-2.26.1-remove-inhibitors.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.26.1-remove-inhibitors.patch b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.26.1-remove-inhibitors.patch
new file mode 100644
index 000000000000..dbe67042ff20
--- /dev/null
+++ b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.26.1-remove-inhibitors.patch
@@ -0,0 +1,85 @@
+From 284c9924969a49dbf2d5fae1d680d3310c4df4a3 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Mon, 02 Nov 2009 23:15:13 +0000
+Subject: Remove session inhibitors if the originator falls of the bus
+
+This fixes a problem where totem leaves inhibitors behind, see
+bug 600488.
+---
+diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
+index e7690a5..7bd3a62 100644
+--- a/src/gs-listener-dbus.c
++++ b/src/gs-listener-dbus.c
+@@ -986,47 +986,40 @@ listener_dbus_remove_ref_entry (GSListener *listener,
+ }
+
+ static gboolean
+-listener_ref_entry_has_connection (gpointer key,
+- gpointer value,
+- gpointer user_data)
+-{
+- GSListenerRefEntry *entry;
+- const char *connection;
+- gboolean matches;
+-
+- entry = (GSListenerRefEntry *)value;
+- connection = (const char *) user_data;
+-
+- matches = FALSE;
+- if (connection != NULL && entry->connection != NULL) {
+- matches = (strcmp (connection, entry->connection) == 0);
+- if (matches) {
+- gs_debug ("removing %s from %s for reason '%s' on connection %s",
+- get_name_for_entry_type (entry->entry_type),
+- entry->application,
+- entry->reason,
+- entry->connection);
+- }
+- }
+-
+- return matches;
+-}
+-
+-static gboolean
+ listener_ref_entry_remove_for_connection (GSListener *listener,
+ int entry_type,
+ const char *connection)
+ {
+ gboolean removed;
+- guint n_removed;
+ GHashTable *hash;
++ GHashTableIter iter;
++ GSListenerRefEntry *entry;
++
++ if (connection == NULL)
++ return FALSE;
+
+ hash = get_hash_for_entry_type (listener, entry_type);
+
+ removed = FALSE;
+- n_removed = g_hash_table_foreach_remove (hash, listener_ref_entry_has_connection, (gpointer)connection);
++ g_hash_table_iter_init (&iter, hash);
++ while (g_hash_table_iter_next (&iter, NULL, (gpointer *)&entry)) {
++ if (entry->connection != NULL &&
++ strcmp (connection, entry->connection) == 0) {
++ gs_debug ("removing %s from %s for reason '%s' on connection %s",
++ get_name_for_entry_type (entry->entry_type),
++ entry->application,
++ entry->reason,
++ entry->connection);
++
++ if (entry->entry_type == REF_ENTRY_TYPE_INHIBIT) {
++ /* remove inhibit from gnome session */
++ remove_session_inhibit (listener, entry);
++ }
+
+- removed = (n_removed > 0);
++ g_hash_table_iter_remove (&iter);
++ removed = TRUE;
++ }
++ }
+
+ return removed;
+ }
+--
+cgit v0.8.3.1