shell-app: Track all application windows
Filtering out "non-interesting" windows beforehand as we currently do means that we may get properties that should be based on all windows, like the last time the application was used, wrong. Just track all windows and filter out non-interesting windows manually in the one place we actually care about the difference. https://bugzilla.gnome.org/show_bug.cgi?id=719824
This commit is contained in:
parent
1e6fff30a3
commit
e19faff101
@ -1498,7 +1498,9 @@ const AppIconMenu = new Lang.Class({
|
|||||||
_redisplay: function() {
|
_redisplay: function() {
|
||||||
this.removeAll();
|
this.removeAll();
|
||||||
|
|
||||||
let windows = this._source.app.get_windows();
|
let windows = this._source.app.get_windows().filter(function(w) {
|
||||||
|
return Shell.WindowTracker.is_window_interesting(w);
|
||||||
|
});
|
||||||
|
|
||||||
// Display the app windows menu items and the separator between windows
|
// Display the app windows menu items and the separator between windows
|
||||||
// of the current desktop and other windows.
|
// of the current desktop and other windows.
|
||||||
|
@ -739,10 +739,10 @@ shell_app_compare_windows (gconstpointer a,
|
|||||||
* shell_app_get_windows:
|
* shell_app_get_windows:
|
||||||
* @app:
|
* @app:
|
||||||
*
|
*
|
||||||
* Get the toplevel, interesting windows which are associated with this
|
* Get the windows which are associated with this application. The
|
||||||
* application. The returned list will be sorted first by whether
|
* returned list will be sorted first by whether they're on the
|
||||||
* they're on the active workspace, then by whether they're visible,
|
* active workspace, then by whether they're visible, and finally
|
||||||
* and finally by the time the user last interacted with them.
|
* by the time the user last interacted with them.
|
||||||
*
|
*
|
||||||
* Returns: (transfer none) (element-type MetaWindow): List of windows
|
* Returns: (transfer none) (element-type MetaWindow): List of windows
|
||||||
*/
|
*/
|
||||||
|
@ -489,9 +489,6 @@ track_window (ShellWindowTracker *self,
|
|||||||
{
|
{
|
||||||
ShellApp *app;
|
ShellApp *app;
|
||||||
|
|
||||||
if (!shell_window_tracker_is_window_interesting (window))
|
|
||||||
return;
|
|
||||||
|
|
||||||
app = get_app_for_window (self, window);
|
app = get_app_for_window (self, window);
|
||||||
if (!app)
|
if (!app)
|
||||||
return;
|
return;
|
||||||
@ -530,11 +527,8 @@ disassociate_window (ShellWindowTracker *self,
|
|||||||
|
|
||||||
g_hash_table_remove (self->window_to_app, window);
|
g_hash_table_remove (self->window_to_app, window);
|
||||||
|
|
||||||
if (shell_window_tracker_is_window_interesting (window))
|
_shell_app_remove_window (app, window);
|
||||||
{
|
g_signal_handlers_disconnect_by_func (window, G_CALLBACK(on_wm_class_changed), self);
|
||||||
_shell_app_remove_window (app, window);
|
|
||||||
g_signal_handlers_disconnect_by_func (window, G_CALLBACK(on_wm_class_changed), self);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_signal_emit (self, signals[TRACKED_WINDOWS_CHANGED], 0);
|
g_signal_emit (self, signals[TRACKED_WINDOWS_CHANGED], 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user