get window under cursor in kill

This commit is contained in:
Vaxry 2022-12-29 11:52:46 +01:00
parent a55db95a3b
commit 3e2200ed90

View file

@ -413,7 +413,7 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) {
void CInputManager::processMouseDownKill(wlr_pointer_button_event* e) { void CInputManager::processMouseDownKill(wlr_pointer_button_event* e) {
switch (e->state) { switch (e->state) {
case WLR_BUTTON_PRESSED: { case WLR_BUTTON_PRESSED: {
const auto PWINDOW = g_pCompositor->m_pLastWindow; const auto PWINDOW = g_pCompositor->vectorToWindowIdeal(getMouseCoordsInternal());
if (!PWINDOW) { if (!PWINDOW) {
Debug::log(ERR, "Cannot kill invalid window!"); Debug::log(ERR, "Cannot kill invalid window!");