diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index beb4f30a..e53dfaf7 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -413,7 +413,7 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) { void CInputManager::processMouseDownKill(wlr_pointer_button_event* e) { switch (e->state) { case WLR_BUTTON_PRESSED: { - const auto PWINDOW = g_pCompositor->m_pLastWindow; + const auto PWINDOW = g_pCompositor->vectorToWindowIdeal(getMouseCoordsInternal()); if (!PWINDOW) { Debug::log(ERR, "Cannot kill invalid window!");