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

fix SharedLayout VisibilityManager::isCurrent state

--when KWin edges are used in a SharedLayout then the
all view Layout::isCurrent() function must be used
otherwise the layout is not identified properly as
current based on different layouts per activities
This commit is contained in:
Michail Vourlakos 2019-07-16 14:06:26 +03:00
parent c94843c9e6
commit 9a10cd1e26
3 changed files with 10 additions and 9 deletions

View File

@ -187,12 +187,11 @@ KWayland::Client::PlasmaShellSurface *ScreenEdgeGhostWindow::surface()
void ScreenEdgeGhostWindow::updateGeometry()
{
QRect newGeometry;
int thickness;
int thickness{2};
if (KWindowSystem::compositingActive()) {
thickness == 6;
} else {
thickness == 2;
};
thickness = 6;
}
if (m_latteView->location() == Plasma::Types::BottomEdge) {
newGeometry.setX(m_latteView->absoluteGeometry().left());

View File

@ -77,6 +77,7 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassWM)
setIcon(qGuiApp->windowIcon());
setResizeMode(QuickViewSharedEngine::SizeRootObjectToView);
setColor(QColor(Qt::transparent));
setDefaultAlphaBuffer(true);
setClearBeforeRendering(true);
const auto flags = Qt::FramelessWindowHint

View File

@ -56,6 +56,9 @@ VisibilityManager::VisibilityManager(PlasmaQuick::ContainmentView *view)
connect(this, &VisibilityManager::slideInFinished, this, &VisibilityManager::updateHiddenState);
connect(this, &VisibilityManager::slideOutFinished, this, &VisibilityManager::updateHiddenState);
connect(this, &VisibilityManager::enableKWinEdgesChanged, this, &VisibilityManager::updateKWinEdgesSupport);
connect(this, &VisibilityManager::modeChanged, this, &VisibilityManager::updateKWinEdgesSupport);
if (m_latteView) {
connect(m_latteView, &Latte::View::eventTriggered, this, &VisibilityManager::viewEventManager);
connect(m_latteView, &Latte::View::byPassWMChanged, this, &VisibilityManager::updateKWinEdgesSupport);
@ -405,7 +408,7 @@ void VisibilityManager::updateGhostWindowState()
bool inCurrentLayout = (m_corona->layoutsManager()->memoryUsage() == Types::SingleLayout ||
(m_corona->layoutsManager()->memoryUsage() == Types::MultipleLayouts
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
&& m_latteView->layout()->name() == m_corona->layoutsManager()->currentLayoutName()));
&& m_latteView->layout()->isCurrent()));
if (inCurrentLayout) {
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isHidden);
@ -686,8 +689,6 @@ void VisibilityManager::setEnableKWinEdges(bool enable)
m_enableKWinEdgesFromUser = enable;
emit enableKWinEdgesChanged();
updateKWinEdgesSupport();
}
void VisibilityManager::updateKWinEdgesSupport()
@ -735,7 +736,7 @@ void VisibilityManager::createEdgeGhostWindow()
bool inCurrentLayout = (m_corona->layoutsManager()->memoryUsage() == Types::SingleLayout ||
(m_corona->layoutsManager()->memoryUsage() == Types::MultipleLayouts
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
&& m_latteView->layout()->name() == m_corona->layoutsManager()->currentLayoutName()));
&& m_latteView->layout()->isCurrent()));
if (m_edgeGhostWindow) {
if (inCurrentLayout) {