window: Handle layer of DOCK windows

Assigning the corresponding stack layer of DOCK windows is currently X11
specific, because there is no way for wayland clients to set the DOCK
window type. This is about to change, so move the code to the generic
layer handling.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3612>
This commit is contained in:
Leonhard 2024-02-23 15:56:29 +01:00 committed by Marge Bot
parent 34ea46d55a
commit 7bf8945da4
2 changed files with 7 additions and 8 deletions

View File

@ -6099,6 +6099,13 @@ meta_window_get_default_layer (MetaWindow *window)
return META_LAYER_TOP;
else if (window->type == META_WINDOW_DESKTOP)
return META_LAYER_DESKTOP;
else if (window->type == META_WINDOW_DOCK)
{
if (window->monitor && window->monitor->in_fullscreen)
return META_LAYER_BOTTOM;
else
return META_LAYER_DOCK;
}
else
return META_LAYER_NORMAL;
}

View File

@ -1846,14 +1846,6 @@ get_standalone_layer (MetaWindow *window)
switch (window->type)
{
case META_WINDOW_DOCK:
if (window->wm_state_below ||
(window->monitor && window->monitor->in_fullscreen))
layer = META_LAYER_BOTTOM;
else
layer = META_LAYER_DOCK;
break;
case META_WINDOW_DROPDOWN_MENU:
case META_WINDOW_POPUP_MENU:
case META_WINDOW_TOOLTIP: