[gnome-shell] window-tracker: Always enable transient_for redirection



commit cca14053a48783d610595efb79b91283f6359806
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jan 17 10:54:13 2014 -0500

    window-tracker: Always enable transient_for redirection
    
    It is possible to associate an application's window with a different
    application using the transient_for hint. However we currently only
    consider the hint in get_window_app() and not when making the original
    association, which opens the door to some confusing inconsistencies;
    for instance, get_window_app() will not necessarily return the same
    value for all windows retrieved via shell_app_get_windows().
    Fix this by looking at the transient_for hint when making the original
    association, not just in get_window_app().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722434

 src/shell-window-tracker.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c
index 9cb4898..1e3d20a 100644
--- a/src/shell-window-tracker.c
+++ b/src/shell-window-tracker.c
@@ -384,8 +384,13 @@ get_app_for_window (ShellWindowTracker    *tracker,
                     MetaWindow            *window)
 {
   ShellApp *result = NULL;
+  MetaWindow *transient_for;
   const char *startup_id;
 
+  transient_for = meta_window_get_transient_for (window);
+  if (transient_for != NULL)
+    return get_app_for_window (tracker, transient_for);
+
   /* First, we check whether we already know about this window,
    * if so, just return that.
    */
@@ -681,13 +686,8 @@ ShellApp *
 shell_window_tracker_get_window_app (ShellWindowTracker *tracker,
                                      MetaWindow         *metawin)
 {
-  MetaWindow *transient_for;
   ShellApp *app;
 
-  transient_for = meta_window_get_transient_for (metawin);
-  if (transient_for != NULL)
-    metawin = transient_for;
-
   app = g_hash_table_lookup (tracker->window_to_app, metawin);
   if (app)
     g_object_ref (app);


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