From de950895522540b4ff457fd5b1c7cc9bd3045d31 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 23 Sep 2023 13:30:53 +0100 Subject: [PATCH] input: fixup mouse down refocus conditions fixes #3402 --- src/managers/input/InputManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index c8221e56..866eb440 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -586,7 +586,7 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) { break; if ((!g_pCompositor->m_sSeat.mouse || !g_pCompositor->m_sSeat.mouse->currentConstraint) /* No constraints */ - && (!g_pCompositor->m_pLastWindow && g_pCompositor->m_pLastWindow != w) /* window should change */) { + && (w && g_pCompositor->m_pLastWindow != w) /* window should change */) { // a bit hacky // if we only pressed one button, allow us to refocus. m_lCurrentlyHeldButtons.size() > 0 will stick the focus if (m_lCurrentlyHeldButtons.size() == 1) {