mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-30 14:50:12 +03:00
fix #43,set NULL mask() for behaveAsPlasmaPanel
--this way plasma frameworks are informed correctly that they can use the window geometry to position their popups
This commit is contained in:
parent
50e9666784
commit
1b0b43e0e0
@ -65,9 +65,9 @@ void Effects::init()
|
||||
connect(this, &Effects::backgroundRadiusEnabledChanged, this, &Effects::updateMask);
|
||||
connect(this, &Effects::subtractedMaskRegionsChanged, this, &Effects::updateMask);
|
||||
connect(this, &Effects::unitedMaskRegionsChanged, this, &Effects::updateMask);
|
||||
connect(m_view, &Latte::View::typeChanged, this, &Effects::updateMask);
|
||||
connect(m_view, &QQuickWindow::widthChanged, this, &Effects::updateMask);
|
||||
connect(m_view, &QQuickWindow::heightChanged, this, &Effects::updateMask);
|
||||
connect(m_view, &Latte::View::behaveAsPlasmaPanelChanged, this, &Effects::updateMask);
|
||||
connect(KWindowSystem::self(), &KWindowSystem::compositingChanged, this, &Effects::updateMask);
|
||||
|
||||
connect(this, &Effects::rectChanged, this, [&]() {
|
||||
@ -444,23 +444,15 @@ void Effects::updateMask()
|
||||
{
|
||||
if (KWindowSystem::compositingActive()) {
|
||||
if (KWindowSystem::isPlatformX11()) {
|
||||
m_view->setMask(QRect(0, 0, m_view->width(), m_view->height()));
|
||||
} else {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/* else {
|
||||
//! this needs investigation under Wayland how to work correctly
|
||||
if (m_view->behaveAsPlasmaPanel()) {
|
||||
if (!m_view->visibility()->isHidden()) {
|
||||
m_view->setMask(QRect());
|
||||
} else {
|
||||
m_view->setMask(VisibilityManager::ISHIDDENMASK);
|
||||
}
|
||||
// set as NULL in order for plasma framrworks to identify NULL Mask properly
|
||||
m_view->setMask(QRect(-1, -1, 0, 0));
|
||||
} else {
|
||||
m_view->setMask(maskCombinedRegion());
|
||||
m_view->setMask(QRect(0, 0, m_view->width(), m_view->height()));
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
// under wayland do nothing
|
||||
}
|
||||
} else {
|
||||
QRegion fixedMask;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user