[gnome-shell] ShellWindowTracker: don't create ShellApps for non-interesting windows



commit 43020b20b770096e208be4eceae360b0020b5c42
Author: Dan Winship <danw gnome org>
Date:   Wed Mar 9 08:58:27 2011 -0500

    ShellWindowTracker: don't create ShellApps for non-interesting windows
    
    If a process does not have any "interesting" windows, then it can't be
    considered a running app. (Previously we were calling
    get_app_for_window() before ruling out non-interesting windows, which
    ended up calling _shell_app_new_for_window(), which would add the
    window to the ShellApp directly, bypassing the is_interesting check.)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=642221

 src/shell-window-tracker.c |   23 +----------------------
 1 files changed, 1 insertions(+), 22 deletions(-)
---
diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c
index d288923..44a4a48 100644
--- a/src/shell-window-tracker.c
+++ b/src/shell-window-tracker.c
@@ -226,23 +226,6 @@ get_appid_from_window (MetaWindow  *window)
 }
 
 /**
- * window_is_tracked:
- *
- * We don't attempt to associate override-redirect windows with applications
- * at all, since there's no reason to do so yet.
- *
- * Returns: %TRUE iff we want to scan this window for application association
- */
-static gboolean
-window_is_tracked (MetaWindow *window)
-{
-  if (meta_window_is_override_redirect (window))
-    return FALSE;
-
-  return TRUE;
-}
-
-/**
  * shell_window_tracker_is_window_interesting:
  *
  * The ShellWindowTracker associates certain kinds of windows with
@@ -529,7 +512,7 @@ track_window (ShellWindowTracker *self,
 {
   ShellApp *app;
 
-  if (!window_is_tracked (window))
+  if (!shell_window_tracker_is_window_interesting (window))
     return;
 
   app = get_app_for_window (self, window);
@@ -539,10 +522,6 @@ track_window (ShellWindowTracker *self,
   /* At this point we've stored the association from window -> application */
   g_hash_table_insert (self->window_to_app, window, app);
 
-  /* However, only put interesting windows in the window list for an app. */
-  if (!shell_window_tracker_is_window_interesting (window))
-    return;
-
   if (shell_app_is_transient (app))
     {
       /* For a transient application, it's possible one of our title regexps



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