[gnome-shell] ShellAppMonitor: Fix case of not seeing apps being closed
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] ShellAppMonitor: Fix case of not seeing apps being closed
- Date: Thu, 6 Aug 2009 00:13:49 +0000 (UTC)
commit 90979faedd70d569f16f56a546cf330dc116d636
Author: Colin Walters <walters verbum org>
Date: Wed Aug 5 20:07:30 2009 -0400
ShellAppMonitor: Fix case of not seeing apps being closed
Remove the app from the window_to_app hash *before* emitting
CHANGED, otherwise a signal handler could see stale data.
src/shell-app-monitor.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/shell-app-monitor.c b/src/shell-app-monitor.c
index 5710704..f3bf705 100644
--- a/src/shell-app-monitor.c
+++ b/src/shell-app-monitor.c
@@ -532,10 +532,11 @@ shell_app_monitor_on_window_removed (MetaWorkspace *workspace,
self->watched_window = NULL;
usage->window_count--;
+ /* Remove before emitting */
+ g_hash_table_remove (self->window_to_app, window);
+
if (usage->window_count == 0)
g_signal_emit (self, signals[CHANGED], 0);
-
- g_hash_table_remove (self->window_to_app, window);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]