mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-24 02:50:35 +03:00
floating:staying mouse on edge and not hiding
--when the floating view is a real panel window and slides out-in with real animation if the user keeps its mouse on the screen edge the view can remain shown without sliding out
This commit is contained in:
parent
dba2f3bc8b
commit
efbd2a8276
@ -186,6 +186,10 @@ KWayland::Client::PlasmaShellSurface *ScreenEdgeGhostWindow::surface()
|
||||
|
||||
void ScreenEdgeGhostWindow::updateGeometry()
|
||||
{
|
||||
if (m_latteView->positioner()->slideOffset() != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
QRect newGeometry;
|
||||
int thickness{2};
|
||||
|
||||
|
@ -396,9 +396,7 @@ void VisibilityManager::setIsHidden(bool isHidden)
|
||||
|
||||
m_isHidden = isHidden;
|
||||
|
||||
if (!m_latteView->behaveAsPlasmaPanel()) {
|
||||
updateGhostWindowState();
|
||||
}
|
||||
updateGhostWindowState();
|
||||
|
||||
emit isHiddenChanged();
|
||||
}
|
||||
@ -479,7 +477,13 @@ void VisibilityManager::updateGhostWindowState()
|
||||
if (m_mode == Latte::Types::WindowsCanCover) {
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isBelowLayer && !m_containsMouse);
|
||||
} else {
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isHidden && !m_containsMouse);
|
||||
bool viewIsFloatingAndMouseOnEdge =
|
||||
m_latteView->behaveAsPlasmaPanel()
|
||||
&& m_latteView->screenEdgeMarginEnabled()
|
||||
&& m_latteView->screenEdgeMargin()>0
|
||||
&& m_edgeGhostWindow->containsMouse();
|
||||
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, (m_isHidden && !m_containsMouse) || viewIsFloatingAndMouseOnEdge);
|
||||
}
|
||||
} else {
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, false);
|
||||
@ -552,7 +556,7 @@ void VisibilityManager::updateHiddenState()
|
||||
switch (m_mode) {
|
||||
case Types::AutoHide:
|
||||
case Types::WindowsCanCover:
|
||||
raiseView(m_containsMouse);
|
||||
raiseView(m_containsMouse || (m_edgeGhostWindow && m_edgeGhostWindow->containsMouse()));
|
||||
break;
|
||||
|
||||
case Types::DodgeActive:
|
||||
|
Loading…
x
Reference in New Issue
Block a user