ShellWindowTracker: Follow transients for focus app

As a side effect of (see bug 642221), we no longer put docks or
transient windows into the hash table mapping windows to apps.  The
"focused application" code relied on at least transients being in
there.

Fix this by calling the public API to map a window to an app, which
will at least follow transients.  Whether we also want further
matching here (e.g. with window grouping) is another issue, but that
can happen as a different bug.

https://bugzilla.gnome.org/show_bug.cgi?id=647082
This commit is contained in:
Colin Walters 2011-04-12 17:29:05 -04:00
parent ba4a57ba0b
commit db6caac9cc

View File

@ -886,7 +886,7 @@ on_focus_window_changed (MetaDisplay *display,
ShellApp *new_focus_app;
new_focus_win = meta_display_get_focus_window (display);
new_focus_app = new_focus_win ? g_hash_table_lookup (tracker->window_to_app, new_focus_win) : NULL;
new_focus_app = new_focus_win ? shell_window_tracker_get_window_app (tracker, new_focus_win) : NULL;
set_focus_app (tracker, new_focus_app);
}