mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 22:51:58 -07:00
InputManager: add nofollowmouse (#9994)
* InputManager: add nofollowmouse with this, focus_follows_mouse=1 acts like focus_follows_mouse=2 on the specific windows defined by the user * e * e biggest e of all time
This commit is contained in:
@@ -546,8 +546,12 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) {
|
||||
// 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.lock() != pFoundWindow || g_pCompositor->m_pLastWindow.lock() != pFoundWindow) {
|
||||
if (m_fMousePosDelta > *PFOLLOWMOUSETHRESHOLD || refocus)
|
||||
g_pCompositor->focusWindow(pFoundWindow, foundSurface);
|
||||
if (m_fMousePosDelta > *PFOLLOWMOUSETHRESHOLD || refocus) {
|
||||
const bool hasNoFollowMouse = pFoundWindow && pFoundWindow->m_sWindowData.noFollowMouse.valueOrDefault();
|
||||
|
||||
if (refocus || !hasNoFollowMouse)
|
||||
g_pCompositor->focusWindow(pFoundWindow, foundSurface);
|
||||
}
|
||||
} else
|
||||
g_pCompositor->focusSurface(foundSurface, pFoundWindow);
|
||||
}
|
||||
|
Reference in New Issue
Block a user