From d22381491d109359c6b081b00f863b639acc6aae Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 3 May 2025 11:12:32 +0530 Subject: [PATCH] Restore top/bottom panel functionality on i3 --- docs/kittens/panel.rst | 6 ++++++ glfw/x11_window.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/kittens/panel.rst b/docs/kittens/panel.rst index 6ea6f435a..de30f1609 100644 --- a/docs/kittens/panel.rst +++ b/docs/kittens/panel.rst @@ -211,3 +211,9 @@ Compatibility with various platforms - 🟢 - 🟢 - + + * - i3 + - 🔴 + - 🟠 + - 🔴 + - only top and bottom dock panels, without transparency diff --git a/glfw/x11_window.c b/glfw/x11_window.c index 331e762ae..37af23d65 100644 --- a/glfw/x11_window.c +++ b/glfw/x11_window.c @@ -679,7 +679,11 @@ update_wm_hints(_GLFWwindow *window, const WindowGeometry *wg, const _GLFWwndcon #define S(x) if (_glfw.x11.x) { states[count++] = _glfw.x11.x; } else { _glfwInputError(GLFW_PLATFORM_ERROR, "X11: Window manager does not support _%s", #x); ok = false; } switch (config.type) { case GLFW_LAYER_SHELL_NONE: break; - case GLFW_LAYER_SHELL_BACKGROUND: case GLFW_LAYER_SHELL_PANEL: S(NET_WM_STATE_BELOW); break; + case GLFW_LAYER_SHELL_BACKGROUND: S(NET_WM_STATE_BELOW); break; + case GLFW_LAYER_SHELL_PANEL: + // i3 does not support NET_WM_STATE_BELOW but panels work without it + if (_glfw.x11.NET_WM_STATE_BELOW) { S(NET_WM_STATE_BELOW); } + break; case GLFW_LAYER_SHELL_TOP: case GLFW_LAYER_SHELL_OVERLAY: S(NET_WM_STATE_ABOVE); break; } #undef S