From c9aa60b5929d773d0dbff1642d94512a63f77c25 Mon Sep 17 00:00:00 2001 From: slidinghotdog <33790211+slidinghotdog@users.noreply.github.com> Date: Fri, 17 Dec 2021 01:07:39 -0300 Subject: [PATCH 1/3] Listen to KWindowSystem::showingDesktopChanged to show panel if Hide only on overlap is enabled --- panel/lxqtpanel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/panel/lxqtpanel.cpp b/panel/lxqtpanel.cpp index 1598c5efa..f1c1d2aef 100644 --- a/panel/lxqtpanel.cpp +++ b/panel/lxqtpanel.cpp @@ -282,6 +282,13 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg mShowDelayTimer.start(); } }); + connect(KWindowSystem::self(), &KWindowSystem::showingDesktopChanged, this, [this] (bool showing) { + if (showing && mHidable && mHideOnOverlap) { + mHideTimer.stop(); + if (mHidden) + mShowDelayTimer.start(); + } + }); } /************************************************ From d5124abd0828d76874463499e9f5faace5d73607 Mon Sep 17 00:00:00 2001 From: slidinghotdog <33790211+slidinghotdog@users.noreply.github.com> Date: Sat, 18 Dec 2021 05:24:52 -0300 Subject: [PATCH 2/3] prevent hiding again when showing desktop --- panel/lxqtpanel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panel/lxqtpanel.cpp b/panel/lxqtpanel.cpp index f1c1d2aef..a081ad38b 100644 --- a/panel/lxqtpanel.cpp +++ b/panel/lxqtpanel.cpp @@ -1467,7 +1467,8 @@ void LXQtPanel::hidePanelWork() { if (!testAttribute(Qt::WA_UnderMouse)) { - if (!mStandaloneWindows->isAnyWindowShown()) + if (!mStandaloneWindows->isAnyWindowShown() + && !(mHideOnOverlap && KWindowSystem::showingDesktop())) { if (!mHideOnOverlap || isPanelOverlapped()) { From 2c5d1d79c7bfbe8301fb455e1ea073b11226fc05 Mon Sep 17 00:00:00 2001 From: slidinghotdog <33790211+slidinghotdog@users.noreply.github.com> Date: Sat, 18 Dec 2021 17:25:42 -0300 Subject: [PATCH 3/3] start hide timer so it triggers again when something changes --- panel/lxqtpanel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/panel/lxqtpanel.cpp b/panel/lxqtpanel.cpp index a081ad38b..bc9213f77 100644 --- a/panel/lxqtpanel.cpp +++ b/panel/lxqtpanel.cpp @@ -284,9 +284,8 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg }); connect(KWindowSystem::self(), &KWindowSystem::showingDesktopChanged, this, [this] (bool showing) { if (showing && mHidable && mHideOnOverlap) { - mHideTimer.stop(); - if (mHidden) - mShowDelayTimer.start(); + showPanel(mAnimationTime > 0); + mHideTimer.start(); } }); }