mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 08:45:58 +01:00
input: avoid rampant refocuses on popups
This commit is contained in:
parent
ef490965a2
commit
3cca36e773
1 changed files with 10 additions and 2 deletions
|
@ -422,8 +422,16 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
return; // don't enter any new surfaces
|
return; // don't enter any new surfaces
|
||||||
} else {
|
} else {
|
||||||
if (allowKeyboardRefocus && ((FOLLOWMOUSE != 3 && (*PMOUSEREFOCUS || m_pLastMouseFocus != pFoundWindow)) || refocus)) {
|
if (allowKeyboardRefocus && ((FOLLOWMOUSE != 3 && (*PMOUSEREFOCUS || m_pLastMouseFocus != pFoundWindow)) || refocus)) {
|
||||||
|
if (m_pLastMouseFocus != pFoundWindow || g_pCompositor->m_pLastFocus != foundSurface) {
|
||||||
m_pLastMouseFocus = pFoundWindow;
|
m_pLastMouseFocus = pFoundWindow;
|
||||||
|
|
||||||
|
// TODO: this looks wrong. When over a popup, it constantly is switching.
|
||||||
|
// Temp fix until that's figured out. Otherwise spams windowrule lookups and other shit.
|
||||||
|
if (m_pLastMouseFocus != pFoundWindow)
|
||||||
g_pCompositor->focusWindow(pFoundWindow, foundSurface);
|
g_pCompositor->focusWindow(pFoundWindow, foundSurface);
|
||||||
|
else
|
||||||
|
g_pCompositor->focusSurface(foundSurface, pFoundWindow);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue