Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont set active monitor when simulating mouse movement #5465

Merged
merged 2 commits into from
Apr 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/managers/input/InputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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;

Expand All @@ -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
Expand All @@ -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) {
Expand All @@ -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;
}

Expand Down
Loading