From 01c925f22841695e00a974c04dcd8803ea8a0dd7 Mon Sep 17 00:00:00 2001 From: Filippo Gentile Date: Thu, 28 Mar 2024 11:21:38 +0100 Subject: [PATCH] LXQtTaskbarWaylandBackend: possibly fix crash on showDesktop for non- KWin --- panel/backends/wayland/lxqttaskbarbackendwayland.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panel/backends/wayland/lxqttaskbarbackendwayland.cpp b/panel/backends/wayland/lxqttaskbarbackendwayland.cpp index fb6e940a8..37b9817b7 100644 --- a/panel/backends/wayland/lxqttaskbarbackendwayland.cpp +++ b/panel/backends/wayland/lxqttaskbarbackendwayland.cpp @@ -450,11 +450,14 @@ bool LXQtTaskbarWaylandBackend::isAreaOverlapped(const QRect &area) const bool LXQtTaskbarWaylandBackend::isShowingDesktop() const { - return m_managment->isShowingDesktop(); + return m_managment->isActive() ? m_managment->isShowingDesktop() : false; } bool LXQtTaskbarWaylandBackend::showDesktop(bool value) { + if(!m_managment->isActive()) + return false; + enum LXQtTaskBarPlasmaWindowManagment::show_desktop flag_; if(value) flag_ = LXQtTaskBarPlasmaWindowManagment::show_desktop::show_desktop_enabled;