From 8321d6be46ed2df7dfe7ec142716a7d1a50d2d5e Mon Sep 17 00:00:00 2001 From: dranull <150595692+dranull@users.noreply.github.com> Date: Thu, 28 Dec 2023 22:54:41 +0000 Subject: internal: Unify input handling on decorations (#4280) * Unify input handling on decorations * Make input methods private * Optional data --- src/managers/KeybindManager.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index d58aa8d8..23478a10 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1840,17 +1840,8 @@ void CKeybindManager::mouse(std::string args) { const auto mouseCoords = g_pInputManager->getMouseCoordsInternal(); CWindow* pWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords); - if (pWindow && !pWindow->m_bIsFullscreen && !pWindow->hasPopupAt(mouseCoords)) { - for (auto& wd : pWindow->m_dWindowDecorations) { - if (!(wd->getDecorationFlags() & DECORATION_ALLOWS_MOUSE_INPUT)) - continue; - - if (g_pDecorationPositioner->getWindowDecorationBox(wd.get()).containsPoint(mouseCoords)) { - wd->onBeginWindowDragOnDeco(mouseCoords); - break; - } - } - } + if (pWindow && !pWindow->m_bIsFullscreen) + pWindow->checkInputOnDecos(INPUT_TYPE_DRAG_START, mouseCoords); if (!g_pInputManager->currentlyDraggedWindow) g_pInputManager->currentlyDraggedWindow = pWindow; -- cgit v1.2.3