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;
}