Skip to content

Commit

Permalink
input: focus monitor on mouse down
Browse files Browse the repository at this point in the history
fixes #4649
  • Loading branch information
vaxerski committed Feb 10, 2024
1 parent cb258c8 commit e4bb5fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/managers/input/InputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e4bb5fa

Please sign in to comment.