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:
parent
d29723cb76
commit
55e953b383
2 changed files with 8 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue