From f26cba96c2499321dbc81ae9463b15ce0839a534 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen <645432-yan12125@users.noreply.gitlab.com> Date: Sun, 25 Dec 2022 12:51:10 +0800 Subject: [PATCH] panel: avoid covering fullscreen windows Since xfwm4 4.18 [1], windows with _NET_WM_STATE_ABOVE cover fullscreen windows. Qt's XCB plugin sets _NET_WM_STATE_ABOVE for windows with the flag Qt::WindowStaysOnTopHint [2], so panels cover fullscreen windows. On the other hand, panels have the window type dock [3], which still covers normal windows per the spec [4] and in xfwm4. The xfwm4 change [1] mentions it follows GNOME, so the issue may be present on Mutter as well. [1] https://gitlab.xfce.org/xfce/xfwm4/-/commit/cdcce73653d430d9cbddba3873e4e98ddae0a6a8 [2] https://github.com/qt/qtbase/blob/v5.15.7-lts-lgpl/src/plugins/platforms/xcb/qxcbwindow.cpp#L1060 [3] https://github.com/lxqt/lxqt-panel/blob/dbd15d48e0cd8a0b92c769fb9ca875f94154ad74/panel/lxqtpanel.cpp#L167 [4] https://specifications.freedesktop.org/wm-spec/latest/ar01s09.html#STACKINGORDER --- panel/lxqtpanel.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/panel/lxqtpanel.cpp b/panel/lxqtpanel.cpp index d2916b63b..a4f7be530 100644 --- a/panel/lxqtpanel.cpp +++ b/panel/lxqtpanel.cpp @@ -146,9 +146,7 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg //Qt documentation or at https://doc.qt.io/qt-5/qt.html //Qt::FramelessWindowHint = Produces a borderless window. The user cannot //move or resize a borderless window via the window system. On X11, ... - //Qt::WindowStaysOnTopHint = Informs the window system that the window - //should stay on top of all other windows. Note that on ... - Qt::WindowFlags flags = Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint; + Qt::WindowFlags flags = Qt::FramelessWindowHint; // NOTE: by PCMan: // In Qt 4, the window is not activated if it has Qt::WA_X11NetWmWindowTypeDock.