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
pull/21/head
Michail Vourlakos 4 years ago
parent cee7a73ad0
commit d610cd3419

@ -642,24 +642,15 @@ void VisibilityManager::updateGhostWindowState()
void VisibilityManager::hide() void VisibilityManager::hide()
{ {
if (KWindowSystem::isPlatformX11()) {
m_lastMask = m_latteView->mask(); m_lastMask = m_latteView->mask();
m_latteView->setMask(QRect(-1, -1, 1, 1)); m_latteView->setMask(QRect(-1, -1, 1, 1));
} else {
//! wayland case
m_latteView->hide();
}
} }
void VisibilityManager::show() void VisibilityManager::show()
{ {
if (KWindowSystem::isPlatformX11()) { if (m_latteView->mask() == QRect(-1, -1 , 1, 1)) {
if (m_latteView->mask() == QRect(-1, -1 , 1, 1)) { m_latteView->setMask(m_lastMask);
m_latteView->setMask(m_lastMask);
}
} else {
//! wayland case
m_latteView->show();
} }
} }

Loading…
Cancel
Save