diff --git a/compositor/ShellClients/ShellClientsManager.vala b/compositor/ShellClients/ShellClientsManager.vala index 7172e1b0..fe8ce2c3 100644 --- a/compositor/ShellClients/ShellClientsManager.vala +++ b/compositor/ShellClients/ShellClientsManager.vala @@ -182,21 +182,32 @@ public class GreeterCompositor.ShellClientsManager : Object { window.unmanaging.connect_after ((_window) => positioned_windows.remove (_window)); } - public void make_centered (Meta.Window window) requires (!is_itself_positioned (window)) { + public void make_centered (Meta.Window window) requires (!is_itself_shell_window (window)) { positioned_windows[window] = new ShellWindow (window, CENTER); // connect_after so we make sure that any queued move is unqueued window.unmanaging.connect_after ((_window) => positioned_windows.remove (_window)); } - public bool is_itself_positioned (Meta.Window window) { - return (window in positioned_windows) || (window in panel_windows) || NotificationStack.is_notification (window); + public bool is_itself_shell_window (Meta.Window window) { + return ( + (window in panel_windows) || + NotificationStack.is_notification (window) + ); } - public bool is_positioned_window (Meta.Window window) { - bool positioned = is_itself_positioned (window); + /** + * Whether the given window is a shell window. A shell window is a window that's + * part of the desktop shell itself and should be completely ignored by other components. + * It is entirely managed by Gala, always above everything else, and manages hiding + * in e.g. multitasking view itself. This also applies to transient windows of shell windows. + * Note that even if `false` is returned the window might still be in part managed by gala + * e.g. for centered windows. + */ + public bool is_shell_window (Meta.Window window) { + bool positioned = is_itself_shell_window (window); window.foreach_ancestor ((ancestor) => { - if (is_itself_positioned (ancestor)) { + if (is_itself_shell_window (ancestor)) { positioned = true; } diff --git a/compositor/WindowManager.vala b/compositor/WindowManager.vala index 396d3313..9e08f3c6 100644 --- a/compositor/WindowManager.vala +++ b/compositor/WindowManager.vala @@ -31,7 +31,7 @@ namespace GreeterCompositor { /** * The group that contains all WindowActors that make shell elements, that is all windows reported as - * ShellClientsManager.is_positioned_window. + * ShellClientsManager.is_shell_window. * It will (eventually) never be hidden by other components and is always on top of everything. Therefore elements are * responsible themselves for hiding depending on the state we are currently in (e.g. normal desktop, open multitasking view, fullscreen, etc.). */ @@ -309,7 +309,7 @@ namespace GreeterCompositor { private void check_shell_window (Meta.WindowActor actor) { unowned var window = actor.get_meta_window (); - if (ShellClientsManager.get_instance ().is_positioned_window (window)) { + if (ShellClientsManager.get_instance ().is_shell_window (window)) { Utils.clutter_actor_reparent (actor, shell_group); }