diff options
| author | dranull <150595692+dranull@users.noreply.github.com> | 2024-01-01 12:02:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-01 13:02:16 +0100 |
| commit | 7c1ac58a4bfc67addf10a2bd2497e71da923eba3 (patch) | |
| tree | ef655a7b0f8f1e55e7223f21d3ec6e6205c5822f /src/managers/input/InputManager.cpp | |
| parent | 46997a764304366d772456c20b1c719960927aa7 (diff) | |
input: Ignore some input events when focus is on a layer surface (#4306)
* No motion events with focus on LS on workspace change
* Don't check scroll events on decorations with focus on LS
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 78058a8a..207df738 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -687,11 +687,13 @@ void CInputManager::onMouseWheel(wlr_pointer_axis_event* e) { if (!passEvent) return; - const auto MOUSECOORDS = g_pInputManager->getMouseCoordsInternal(); - const auto PWINDOW = g_pCompositor->vectorToWindowIdeal(MOUSECOORDS); + if (!m_bLastFocusOnLS) { + const auto MOUSECOORDS = g_pInputManager->getMouseCoordsInternal(); + const auto PWINDOW = g_pCompositor->vectorToWindowIdeal(MOUSECOORDS); - if (PWINDOW && PWINDOW->checkInputOnDecos(INPUT_TYPE_AXIS, MOUSECOORDS, e)) - return; + if (PWINDOW && PWINDOW->checkInputOnDecos(INPUT_TYPE_AXIS, MOUSECOORDS, e)) + return; + } wlr_seat_pointer_notify_axis(g_pCompositor->m_sSeat.seat, e->time_msec, e->orientation, factor * e->delta, std::round(factor * e->delta_discrete), e->source); } |
