aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-02-10 17:39:24 +0000
committerVaxry <[email protected]>2024-02-10 17:39:53 +0000
commite4bb5fa4af1a6c36aab1c28651b5403dc4952f93 (patch)
tree1b90bfcdddf320667e42bb9e86d995cc404fa359
parentcb258c82f4fa3276ad9b2e2dfc1243e8ee683b2c (diff)
downloadHyprland-e4bb5fa4af1a6c36aab1c28651b5403dc4952f93.tar.gz
Hyprland-e4bb5fa4af1a6c36aab1c28651b5403dc4952f93.zip
input: focus monitor on mouse down
fixes #4649
-rw-r--r--src/managers/input/InputManager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 44bbaf28..9f713b03 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -645,9 +645,11 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) {
}
// notify app if we didnt handle it
- if (g_pCompositor->doesSeatAcceptInput(g_pCompositor->m_pLastFocus)) {
+ if (g_pCompositor->doesSeatAcceptInput(g_pCompositor->m_pLastFocus))
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, e->time_msec, e->button, e->state);
- }
+
+ if (const auto PMON = g_pCompositor->getMonitorFromVector(mouseCoords); PMON != g_pCompositor->m_pLastMonitor && PMON)
+ g_pCompositor->setActiveMonitor(PMON);
}
void CInputManager::processMouseDownKill(wlr_pointer_button_event* e) {