diff --git a/app/view/view.cpp b/app/view/view.cpp index acf3dfa90..1d8eac109 100644 --- a/app/view/view.cpp +++ b/app/view/view.cpp @@ -643,6 +643,11 @@ void View::setInEditMode(bool edit) emit inEditModeChanged(); } +bool View::isFloatingWindow() const +{ + return m_behaveAsPlasmaPanel && m_screenEdgeMarginEnabled && (m_screenEdgeMargin>0); +} + bool View::isPreferredForShortcuts() const { return m_isPreferredForShortcuts; diff --git a/app/view/view.h b/app/view/view.h index 69a091f4d..af55740d1 100644 --- a/app/view/view.h +++ b/app/view/view.h @@ -150,6 +150,8 @@ public: bool inEditMode() const; void setInEditMode(bool edit); + bool isFloatingWindow() const; + bool isPreferredForShortcuts() const; void setIsPreferredForShortcuts(bool preferred); diff --git a/app/view/visibilitymanager.cpp b/app/view/visibilitymanager.cpp index fa28bbc0a..6e765f67c 100644 --- a/app/view/visibilitymanager.cpp +++ b/app/view/visibilitymanager.cpp @@ -57,8 +57,16 @@ VisibilityManager::VisibilityManager(PlasmaQuick::ContainmentView *view) m_corona = qobject_cast(view->corona()); m_wm = m_corona->wm(); - connect(this, &VisibilityManager::slideInFinished, this, &VisibilityManager::updateHiddenState); connect(this, &VisibilityManager::slideOutFinished, this, &VisibilityManager::updateHiddenState); + connect(this, &VisibilityManager::slideInFinished, this, [&]() { + if (m_latteView && !m_latteView->isFloatingWindow()) { + //! after slide-out the real floating windows should ignore their criteria + //! until containsMouse from view has been set to true and false to afterwards + updateHiddenState(); + } else { + m_timerHide.stop(); + } + }); connect(this, &VisibilityManager::enableKWinEdgesChanged, this, &VisibilityManager::updateKWinEdgesSupport); connect(this, &VisibilityManager::modeChanged, this, &VisibilityManager::updateKWinEdgesSupport); @@ -477,13 +485,13 @@ void VisibilityManager::updateGhostWindowState() if (m_mode == Latte::Types::WindowsCanCover) { m_wm->setActiveEdge(m_edgeGhostWindow, m_isBelowLayer && !m_containsMouse); } else { - bool viewIsFloatingAndContainsMouse = + /* bool viewIsFloatingAndContainsMouse = m_latteView->behaveAsPlasmaPanel() && m_latteView->screenEdgeMarginEnabled() && m_latteView->screenEdgeMargin()>0 - && (m_edgeGhostWindow->containsMouse() || m_containsMouse); + && (m_edgeGhostWindow->containsMouse() || m_containsMouse);*/ - bool activated = (m_isHidden && !m_containsMouse) || viewIsFloatingAndContainsMouse; + bool activated = (m_isHidden && !m_containsMouse); /*|| viewIsFloatingAndContainsMouse;*/ m_wm->setActiveEdge(m_edgeGhostWindow, activated); }