From c77ba179fec8a6fe8b9e0011ce8f6e3e499e81f6 Mon Sep 17 00:00:00 2001 From: Johan Smith Agudelo Rodriguez Date: Thu, 29 Jun 2017 17:02:25 -0500 Subject: [PATCH] fix #568, [Wayland] Dodge modes do not ignore the plasma desktop --- app/waylandinterface.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/app/waylandinterface.cpp b/app/waylandinterface.cpp index 07f627f8d..b728765c3 100644 --- a/app/waylandinterface.cpp +++ b/app/waylandinterface.cpp @@ -281,13 +281,17 @@ bool WaylandInterface::isOnCurrentActivity(WindowId wid) const WindowInfoWrap WaylandInterface::requestInfo(WindowId wid) const { - WindowInfoWrap winfoWrap; - auto it = std::find_if(m_wm->windows().constBegin(), m_wm->windows().constEnd(), [&wid](PlasmaWindow * w){ + auto it = std::find_if(m_wm->windows().constBegin(), m_wm->windows().constEnd(), [&wid](PlasmaWindow * w) noexcept { return w->isValid() && w->internalId() == wid; }); - if (it != m_wm->windows().constEnd()) { - auto w = *it; + if (it == m_wm->windows().constEnd()) + return {}; + + WindowInfoWrap winfoWrap; + auto w = *it; + + if (isValidWindow(w)) { winfoWrap.setIsValid(true); winfoWrap.setWid(wid); winfoWrap.setIsActive(w->isActive()); @@ -297,8 +301,9 @@ WindowInfoWrap WaylandInterface::requestInfo(WindowId wid) const winfoWrap.setIsFullscreen(w->isFullscreen()); winfoWrap.setIsShaded(w->isShaded()); winfoWrap.setGeometry(w->geometry()); - } else { - winfoWrap.setIsValid(false); + } else if (w->appId() == QLatin1String("org.kde.plasmashell")) { + winfoWrap.setIsValid(true); + winfoWrap.setIsPlasmaDesktop(true); winfoWrap.setWid(wid); }