[gnome-shell] [windowTracker] Only remove "interesting" windows



commit 4b1fea2fa43b43b1e5cdf3f884acfa3ebb7c9bfa
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Jun 20 22:46:21 2010 +0200

    [windowTracker] Only remove "interesting" windows
    
    Windows are only added to an application if they are considered
    "interesting". If we keep it that way, we cannot unconditionally
    call _shell_app_remove_window() - applications without interesting
    windows are not considered running, so the call crashes the shell.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=622236

 src/shell-app.c            |    3 +--
 src/shell-window-tracker.c |    3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index 63dbc14..566b1e7 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -757,12 +757,11 @@ void
 _shell_app_remove_window (ShellApp   *app,
                           MetaWindow *window)
 {
+  g_assert (app->running_state != NULL);
 
   if (!g_slist_find (app->running_state->windows, window))
     return;
 
-  g_assert (app->running_state != NULL);
-
   g_signal_handlers_disconnect_by_func (window, G_CALLBACK(shell_app_on_unmanaged), app);
   g_signal_handlers_disconnect_by_func (window, G_CALLBACK(shell_app_on_user_time_changed), app);
   g_object_unref (window);
diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c
index e9eda24..803d607 100644
--- a/src/shell-window-tracker.c
+++ b/src/shell-window-tracker.c
@@ -542,7 +542,8 @@ disassociate_window (ShellWindowTracker   *self,
 
   g_hash_table_remove (self->window_to_app, window);
 
-  _shell_app_remove_window (app, window);
+  if (shell_window_tracker_is_window_interesting (window))
+      _shell_app_remove_window (app, window);
 
   g_signal_emit (self, signals[TRACKED_WINDOWS_CHANGED], 0);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]