summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorthejch <66577496+thejch@users.noreply.github.com>2024-04-06 17:07:21 -0700
committerGitHub <noreply@github.com>2024-04-07 01:07:21 +0100
commit9f1604e4b0afec40cfa9bc095d6613a7f749b2c1 (patch)
tree8a2581235816de7f656265127cd2492c09bcff25 /src/managers/input/InputManager.cpp
parente80bccad513d0761cbb83038478fce72ddc51c01 (diff)
input: Dont set active monitor when simulating mouse movement (#5465)
* fix mouse simulation switching focusedmon * fix some warnings with wrong enum
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index cb14f4b1..05317281 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -196,7 +196,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
g_pLayoutManager->getCurrentLayout()->onMouseMove(getMouseCoordsInternal());
- if (PMONITOR && PMONITOR != g_pCompositor->m_pLastMonitor && (*PMOUSEFOCUSMON || refocus))
+ if (PMONITOR && PMONITOR != g_pCompositor->m_pLastMonitor && (*PMOUSEFOCUSMON || refocus) && !m_pForcedFocus)
g_pCompositor->setActiveMonitor(PMONITOR);
if (g_pSessionLockManager->isSessionLocked()) {
@@ -624,7 +624,7 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) {
}
switch (e->state) {
- case WLR_BUTTON_PRESSED:
+ case WL_POINTER_BUTTON_STATE_PRESSED:
if (*PFOLLOWMOUSE == 3) // don't refocus on full loose
break;
@@ -646,7 +646,7 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) {
g_pCompositor->changeWindowZOrder(g_pCompositor->m_pLastWindow, true);
break;
- case WLR_BUTTON_RELEASED: break;
+ case WL_POINTER_BUTTON_STATE_RELEASED: break;
}
// notify app if we didnt handle it
@@ -659,7 +659,7 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) {
void CInputManager::processMouseDownKill(wlr_pointer_button_event* e) {
switch (e->state) {
- case WLR_BUTTON_PRESSED: {
+ case WL_POINTER_BUTTON_STATE_PRESSED: {
const auto PWINDOW = g_pCompositor->vectorToWindowUnified(getMouseCoordsInternal(), RESERVED_EXTENTS | INPUT_EXTENTS | ALLOW_FLOATING);
if (!PWINDOW) {
@@ -671,7 +671,7 @@ void CInputManager::processMouseDownKill(wlr_pointer_button_event* e) {
kill(PWINDOW->getPID(), SIGKILL);
break;
}
- case WLR_BUTTON_RELEASED: break;
+ case WL_POINTER_BUTTON_STATE_RELEASED: break;
default: break;
}