mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 22:45:59 +01:00
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
This commit is contained in:
parent
46997a7643
commit
7c1ac58a4b
2 changed files with 12 additions and 8 deletions
|
@ -880,10 +880,12 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
} else
|
} else
|
||||||
pWorkspaceToChangeTo->rememberPrevWorkspace(PCURRENTWORKSPACE);
|
pWorkspaceToChangeTo->rememberPrevWorkspace(PCURRENTWORKSPACE);
|
||||||
|
|
||||||
if (!g_pCompositor->m_pLastFocus)
|
if (!g_pInputManager->m_bLastFocusOnLS) {
|
||||||
g_pInputManager->simulateMouseMovement();
|
if (g_pCompositor->m_pLastFocus)
|
||||||
else
|
g_pInputManager->sendMotionEventsToFocused();
|
||||||
g_pInputManager->sendMotionEventsToFocused();
|
else
|
||||||
|
g_pInputManager->simulateMouseMovement();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::fullscreenActive(std::string args) {
|
void CKeybindManager::fullscreenActive(std::string args) {
|
||||||
|
|
|
@ -687,11 +687,13 @@ void CInputManager::onMouseWheel(wlr_pointer_axis_event* e) {
|
||||||
if (!passEvent)
|
if (!passEvent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto MOUSECOORDS = g_pInputManager->getMouseCoordsInternal();
|
if (!m_bLastFocusOnLS) {
|
||||||
const auto PWINDOW = g_pCompositor->vectorToWindowIdeal(MOUSECOORDS);
|
const auto MOUSECOORDS = g_pInputManager->getMouseCoordsInternal();
|
||||||
|
const auto PWINDOW = g_pCompositor->vectorToWindowIdeal(MOUSECOORDS);
|
||||||
|
|
||||||
if (PWINDOW && PWINDOW->checkInputOnDecos(INPUT_TYPE_AXIS, MOUSECOORDS, e))
|
if (PWINDOW && PWINDOW->checkInputOnDecos(INPUT_TYPE_AXIS, MOUSECOORDS, e))
|
||||||
return;
|
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);
|
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue