mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-09 16:58:16 +03:00
fixes for WindowsCanCover
--show immediately when view contains mouse --hide only if view does not contain mouse --never apply ByPassWM hint for WindowsCanCover
This commit is contained in:
parent
4cf929ea81
commit
f93bec8893
@ -843,7 +843,10 @@ void GenericLayout::addView(Plasma::Containment *containment, bool forceOnPrimar
|
||||
auto mode = static_cast<Types::Visibility>(containment->config().readEntry("visibility", static_cast<int>(Types::DodgeActive)));
|
||||
bool byPassWM{false};
|
||||
|
||||
if (mode == Types::AlwaysVisible || mode == Types::WindowsGoBelow) {
|
||||
if (mode == Types::AlwaysVisible
|
||||
|| mode == Types::WindowsGoBelow
|
||||
|| mode == Types::WindowsCanCover
|
||||
|| mode == Types::WindowsAlwaysCover) {
|
||||
byPassWM = false;
|
||||
} else {
|
||||
byPassWM = containment->config().readEntry("byPassWM", false);
|
||||
|
@ -254,7 +254,11 @@ void VisibilityManager::setMode(Latte::Types::Visibility mode)
|
||||
|
||||
case Types::WindowsCanCover:
|
||||
m_connections[base] = connect(this, &VisibilityManager::containsMouseChanged, this, [&]() {
|
||||
raiseView(m_containsMouse);
|
||||
if (m_containsMouse) {
|
||||
emit mustBeShown();
|
||||
} else {
|
||||
raiseView(false);
|
||||
}
|
||||
});
|
||||
|
||||
raiseView(m_containsMouse);
|
||||
@ -475,9 +479,9 @@ void VisibilityManager::updateGhostWindowState()
|
||||
|
||||
if (inCurrentLayout) {
|
||||
if (m_mode == Latte::Types::WindowsCanCover) {
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isBelowLayer);
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isBelowLayer && !m_containsMouse);
|
||||
} else {
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isHidden);
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isHidden && !m_containsMouse);
|
||||
}
|
||||
} else {
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, false);
|
||||
@ -758,14 +762,17 @@ void VisibilityManager::updateKWinEdgesSupport()
|
||||
if ((m_mode == Types::AutoHide
|
||||
|| m_mode == Types::DodgeActive
|
||||
|| m_mode == Types::DodgeAllWindows
|
||||
|| m_mode == Types::DodgeMaximized
|
||||
|| m_mode == Types::WindowsCanCover)
|
||||
&& (!m_latteView->byPassWM()) ) {
|
||||
|| m_mode == Types::DodgeMaximized)
|
||||
&& !m_latteView->byPassWM()) {
|
||||
|
||||
if (m_enableKWinEdgesFromUser) {
|
||||
createEdgeGhostWindow();
|
||||
} else if (!m_enableKWinEdgesFromUser) {
|
||||
deleteEdgeGhostWindow();
|
||||
}
|
||||
|
||||
} else if (m_mode == Types::WindowsCanCover) {
|
||||
createEdgeGhostWindow();
|
||||
} else {
|
||||
deleteEdgeGhostWindow();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user