From 7bf8945da49cd3dbb1540acbf1b062382a1c917c Mon Sep 17 00:00:00 2001 From: Leonhard Date: Fri, 23 Feb 2024 15:56:29 +0100 Subject: [PATCH] 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: --- src/core/window.c | 7 +++++++ src/x11/window-x11.c | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index 248f33dcb..e0c5f8dd5 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -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; } diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index bd8528ced..7f31330f4 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -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: