mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-11-29 12:31:58 +03:00
input: fix follow_focus
This commit is contained in:
parent
770956b092
commit
e5ac970d6e
@ -423,12 +423,12 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||
return; // don't enter any new surfaces
|
||||
} else {
|
||||
if (allowKeyboardRefocus && ((FOLLOWMOUSE != 3 && (*PMOUSEREFOCUS || m_pLastMouseFocus != pFoundWindow)) || refocus)) {
|
||||
if (m_pLastMouseFocus != pFoundWindow || g_pCompositor->m_pLastFocus != foundSurface) {
|
||||
if (m_pLastMouseFocus != pFoundWindow || g_pCompositor->m_pLastWindow != pFoundWindow || g_pCompositor->m_pLastFocus != foundSurface) {
|
||||
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)
|
||||
if (m_pLastMouseFocus != pFoundWindow || g_pCompositor->m_pLastWindow != pFoundWindow)
|
||||
g_pCompositor->focusWindow(pFoundWindow, foundSurface);
|
||||
else
|
||||
g_pCompositor->focusSurface(foundSurface, pFoundWindow);
|
||||
|
Loading…
Reference in New Issue
Block a user