shell: Ignore non-toplevels for ShellWindowTracker::tracked-windows-changed
Popups and other override-redirect windows are meaningless to everything
that depends on the ShellWindowTracker. Ignoring those windows will result
in less ShellApp::windows-changed signal emissions, and less activity in
the AppMenuButton and everything else that depends on them.
Reduces gnome-shell CPU activity while typing on the Epiphany addressbar,
as the pop up animation there results in a number of xdg_popup being
created and destroyed.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/642
https://gitlab.gnome.org/GNOME/mutter/issues/556
(cherry picked from commit db9a7ea7a9
)
This commit is contained in:
parent
40db793230
commit
6bb5c1feec
@ -539,7 +539,12 @@ shell_window_tracker_on_window_added (MetaWorkspace *workspace,
|
||||
gpointer user_data)
|
||||
{
|
||||
ShellWindowTracker *self = SHELL_WINDOW_TRACKER (user_data);
|
||||
MetaWindowType window_type = meta_window_get_window_type (window);
|
||||
|
||||
if (window_type == META_WINDOW_NORMAL ||
|
||||
window_type == META_WINDOW_DIALOG ||
|
||||
window_type == META_WINDOW_UTILITY ||
|
||||
window_type == META_WINDOW_MODAL_DIALOG)
|
||||
track_window (self, window);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user