From d610cd34191ce65cb2969db1cb1cba33624a6712 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 25 Oct 2020 10:46:43 +0200 Subject: [PATCH] wayland:dont show/hide views totally, use mask --use mask to achieve this in order to not have to handle wayland weirdness with surfaces and reattached properties --- app/view/visibilitymanager.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/app/view/visibilitymanager.cpp b/app/view/visibilitymanager.cpp index aa214eff8..0b45b1c55 100644 --- a/app/view/visibilitymanager.cpp +++ b/app/view/visibilitymanager.cpp @@ -642,24 +642,15 @@ void VisibilityManager::updateGhostWindowState() void VisibilityManager::hide() { - if (KWindowSystem::isPlatformX11()) { - m_lastMask = m_latteView->mask(); - m_latteView->setMask(QRect(-1, -1, 1, 1)); - } else { - //! wayland case - m_latteView->hide(); - } + + m_lastMask = m_latteView->mask(); + m_latteView->setMask(QRect(-1, -1, 1, 1)); } void VisibilityManager::show() { - if (KWindowSystem::isPlatformX11()) { - if (m_latteView->mask() == QRect(-1, -1 , 1, 1)) { - m_latteView->setMask(m_lastMask); - } - } else { - //! wayland case - m_latteView->show(); + if (m_latteView->mask() == QRect(-1, -1 , 1, 1)) { + m_latteView->setMask(m_lastMask); } }