From 0d02a927337336b3ae27855b70862642159da4aa Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 29 Jul 2020 00:20:58 +0300 Subject: [PATCH] increase hide timer specific SidebarAutoHide msecs --when the user has triggered its showing. It must be given enough time for the user to observed the sidebar contents before checking out if the sidebar must hide. --- app/view/visibilitymanager.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/view/visibilitymanager.cpp b/app/view/visibilitymanager.cpp index 602667aa9..41e1f1d35 100644 --- a/app/view/visibilitymanager.cpp +++ b/app/view/visibilitymanager.cpp @@ -43,6 +43,10 @@ //! Hide Timer can create cases that when it is low it does not allow the //! view to be show. For example !compositing+kwin_edges+hide inteval<50ms const int HIDEMINIMUMINTERVAL = 50; +//! After calling SidebarAutoHide panel to show for example through Sidebar button +//! or global shortcuts we make sure bar will be shown enough time +//! in order for the user to observe its contents +const int SIDEBARAUTOHIDEMINIMUMSHOW = 1000; namespace Latte { @@ -320,11 +324,7 @@ void VisibilityManager::setMode(Latte::Types::Visibility mode) case Types::SidebarOnDemand: m_connections[base] = connect(m_latteView, &Latte::View::inEditModeChanged, this, [&]() { if (!m_latteView->inEditMode()) { - //! Give the time to View to change from !behaveAsPlasmaPanel to behaveAsPlasmaPanel - //! if this is needed when changing to !inEditMode - QTimer::singleShot(100, [this]() { - toggleHiddenState(); - }); + toggleHiddenState(); } }); @@ -333,7 +333,7 @@ void VisibilityManager::setMode(Latte::Types::Visibility mode) case Types::SidebarAutoHide: m_connections[base] = connect(this, &VisibilityManager::containsMouseChanged, this, [&]() { - if(!isHidden()){ + if(!m_latteView->inEditMode() && !isHidden()){ raiseView(m_containsMouse); } }); @@ -725,7 +725,7 @@ void VisibilityManager::toggleHiddenState() emit mustBeShown(); if(m_mode == Latte::Types::SidebarAutoHide) { - startTimerHide(); + startTimerHide(SIDEBARAUTOHIDEMINIMUMSHOW + m_timerHideInterval); } } else { emit mustBeHide();