aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-09-23 13:30:53 +0100
committervaxerski <[email protected]>2023-09-23 13:30:53 +0100
commitde950895522540b4ff457fd5b1c7cc9bd3045d31 (patch)
tree9af32d463a7c108774f73916816fed560dc78cca /src/managers/input/InputManager.cpp
parent9c00381dfcdebc1b392f0e05552775adc069f163 (diff)
downloadHyprland-de950895522540b4ff457fd5b1c7cc9bd3045d31.tar.gz
Hyprland-de950895522540b4ff457fd5b1c7cc9bd3045d31.zip
input: fixup mouse down refocus conditions
fixes #3402
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp2
1 files changed, 1 insertions, 1 deletions
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) {