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.
This commit is contained in:
parent
21858d928a
commit
90979faedd
@ -532,10 +532,11 @@ shell_app_monitor_on_window_removed (MetaWorkspace *workspace,
|
|||||||
self->watched_window = NULL;
|
self->watched_window = NULL;
|
||||||
|
|
||||||
usage->window_count--;
|
usage->window_count--;
|
||||||
|
/* Remove before emitting */
|
||||||
|
g_hash_table_remove (self->window_to_app, window);
|
||||||
|
|
||||||
if (usage->window_count == 0)
|
if (usage->window_count == 0)
|
||||||
g_signal_emit (self, signals[CHANGED], 0);
|
g_signal_emit (self, signals[CHANGED], 0);
|
||||||
|
|
||||||
g_hash_table_remove (self->window_to_app, window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user