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/layout/IHyprLayout.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/layout/IHyprLayout.cpp') diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 0c6d24fd..76f1e796 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -271,16 +271,8 @@ void IHyprLayout::onEndDragWindow() { CWindow* pWindow = g_pCompositor->vectorToWindowIdeal(MOUSECOORDS, DRAGGINGWINDOW); if (pWindow && pWindow->m_bIsFloating) { - for (auto& wd : pWindow->m_dWindowDecorations) { - if (!(wd->getDecorationFlags() & DECORATION_ALLOWS_MOUSE_INPUT)) - continue; - - if (g_pDecorationPositioner->getWindowDecorationBox(wd.get()).containsPoint(MOUSECOORDS)) { - if (!wd->onEndWindowDragOnDeco(DRAGGINGWINDOW, MOUSECOORDS)) - return; - break; - } - } + if (pWindow->checkInputOnDecos(INPUT_TYPE_DRAG_END, MOUSECOORDS, DRAGGINGWINDOW)) + return; if (pWindow->m_sGroupData.pNextWindow && DRAGGINGWINDOW->canBeGroupedInto(pWindow)) { static const auto* USECURRPOS = &g_pConfigManager->getConfigValuePtr("group:insert_after_current")->intValue; -- cgit v1.2.3