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:
parent
c94843c9e6
commit
9a10cd1e26
@ -187,12 +187,11 @@ KWayland::Client::PlasmaShellSurface *ScreenEdgeGhostWindow::surface()
|
|||||||
void ScreenEdgeGhostWindow::updateGeometry()
|
void ScreenEdgeGhostWindow::updateGeometry()
|
||||||
{
|
{
|
||||||
QRect newGeometry;
|
QRect newGeometry;
|
||||||
int thickness;
|
int thickness{2};
|
||||||
|
|
||||||
if (KWindowSystem::compositingActive()) {
|
if (KWindowSystem::compositingActive()) {
|
||||||
thickness == 6;
|
thickness = 6;
|
||||||
} else {
|
}
|
||||||
thickness == 2;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (m_latteView->location() == Plasma::Types::BottomEdge) {
|
if (m_latteView->location() == Plasma::Types::BottomEdge) {
|
||||||
newGeometry.setX(m_latteView->absoluteGeometry().left());
|
newGeometry.setX(m_latteView->absoluteGeometry().left());
|
||||||
|
@ -77,6 +77,7 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassWM)
|
|||||||
setIcon(qGuiApp->windowIcon());
|
setIcon(qGuiApp->windowIcon());
|
||||||
setResizeMode(QuickViewSharedEngine::SizeRootObjectToView);
|
setResizeMode(QuickViewSharedEngine::SizeRootObjectToView);
|
||||||
setColor(QColor(Qt::transparent));
|
setColor(QColor(Qt::transparent));
|
||||||
|
setDefaultAlphaBuffer(true);
|
||||||
setClearBeforeRendering(true);
|
setClearBeforeRendering(true);
|
||||||
|
|
||||||
const auto flags = Qt::FramelessWindowHint
|
const auto flags = Qt::FramelessWindowHint
|
||||||
|
@ -56,6 +56,9 @@ VisibilityManager::VisibilityManager(PlasmaQuick::ContainmentView *view)
|
|||||||
connect(this, &VisibilityManager::slideInFinished, this, &VisibilityManager::updateHiddenState);
|
connect(this, &VisibilityManager::slideInFinished, this, &VisibilityManager::updateHiddenState);
|
||||||
connect(this, &VisibilityManager::slideOutFinished, 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) {
|
if (m_latteView) {
|
||||||
connect(m_latteView, &Latte::View::eventTriggered, this, &VisibilityManager::viewEventManager);
|
connect(m_latteView, &Latte::View::eventTriggered, this, &VisibilityManager::viewEventManager);
|
||||||
connect(m_latteView, &Latte::View::byPassWMChanged, this, &VisibilityManager::updateKWinEdgesSupport);
|
connect(m_latteView, &Latte::View::byPassWMChanged, this, &VisibilityManager::updateKWinEdgesSupport);
|
||||||
@ -405,7 +408,7 @@ void VisibilityManager::updateGhostWindowState()
|
|||||||
bool inCurrentLayout = (m_corona->layoutsManager()->memoryUsage() == Types::SingleLayout ||
|
bool inCurrentLayout = (m_corona->layoutsManager()->memoryUsage() == Types::SingleLayout ||
|
||||||
(m_corona->layoutsManager()->memoryUsage() == Types::MultipleLayouts
|
(m_corona->layoutsManager()->memoryUsage() == Types::MultipleLayouts
|
||||||
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
||||||
&& m_latteView->layout()->name() == m_corona->layoutsManager()->currentLayoutName()));
|
&& m_latteView->layout()->isCurrent()));
|
||||||
|
|
||||||
if (inCurrentLayout) {
|
if (inCurrentLayout) {
|
||||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isHidden);
|
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isHidden);
|
||||||
@ -686,8 +689,6 @@ void VisibilityManager::setEnableKWinEdges(bool enable)
|
|||||||
m_enableKWinEdgesFromUser = enable;
|
m_enableKWinEdgesFromUser = enable;
|
||||||
|
|
||||||
emit enableKWinEdgesChanged();
|
emit enableKWinEdgesChanged();
|
||||||
|
|
||||||
updateKWinEdgesSupport();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisibilityManager::updateKWinEdgesSupport()
|
void VisibilityManager::updateKWinEdgesSupport()
|
||||||
@ -735,7 +736,7 @@ void VisibilityManager::createEdgeGhostWindow()
|
|||||||
bool inCurrentLayout = (m_corona->layoutsManager()->memoryUsage() == Types::SingleLayout ||
|
bool inCurrentLayout = (m_corona->layoutsManager()->memoryUsage() == Types::SingleLayout ||
|
||||||
(m_corona->layoutsManager()->memoryUsage() == Types::MultipleLayouts
|
(m_corona->layoutsManager()->memoryUsage() == Types::MultipleLayouts
|
||||||
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
||||||
&& m_latteView->layout()->name() == m_corona->layoutsManager()->currentLayoutName()));
|
&& m_latteView->layout()->isCurrent()));
|
||||||
|
|
||||||
if (m_edgeGhostWindow) {
|
if (m_edgeGhostWindow) {
|
||||||
if (inCurrentLayout) {
|
if (inCurrentLayout) {
|
||||||
|
Loading…
Reference in New Issue
Block a user