mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 19:06:00 +01:00
input: send motion events on focusWindow if follows_mouse is 0
This commit is contained in:
parent
92cf1c2337
commit
732b058489
1 changed files with 5 additions and 0 deletions
|
@ -883,6 +883,8 @@ CMonitor* CCompositor::getMonitorFromOutput(wlr_output* out) {
|
||||||
|
|
||||||
void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
||||||
|
|
||||||
|
static auto* const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue;
|
||||||
|
|
||||||
if (g_pCompositor->m_sSeat.exclusiveClient) {
|
if (g_pCompositor->m_sSeat.exclusiveClient) {
|
||||||
Debug::log(LOG, "Disallowing setting focus to a window due to there being an active input inhibitor layer.");
|
Debug::log(LOG, "Disallowing setting focus to a window due to there being an active input inhibitor layer.");
|
||||||
return;
|
return;
|
||||||
|
@ -1006,6 +1008,9 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
||||||
} else {
|
} else {
|
||||||
std::rotate(m_vWindowFocusHistory.begin(), HISTORYPIVOT, HISTORYPIVOT + 1);
|
std::rotate(m_vWindowFocusHistory.begin(), HISTORYPIVOT, HISTORYPIVOT + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (*PFOLLOWMOUSE == 0)
|
||||||
|
g_pInputManager->sendMotionEventsToFocused();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
|
void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
|
||||||
|
|
Loading…
Reference in a new issue