1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 13:33:50 +03:00

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
This commit is contained in:
Michail Vourlakos 2020-10-25 10:46:43 +02:00
parent cee7a73ad0
commit d610cd3419

View File

@ -642,25 +642,16 @@ 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();
}
}
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();
}
}