summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authordranull <150595692+dranull@users.noreply.github.com>2023-12-28 22:54:41 +0000
committerGitHub <noreply@github.com>2023-12-28 23:54:41 +0100
commit8321d6be46ed2df7dfe7ec142716a7d1a50d2d5e (patch)
tree8381a98e72b0ae839847da7ac7a122027317b6bf /src/managers/KeybindManager.cpp
parentcedf5f1fca057351d85560ff72bf2cc6cc609755 (diff)
internal: Unify input handling on decorations (#4280)
* Unify input handling on decorations * Make input methods private * Optional data
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp13
1 files changed, 2 insertions, 11 deletions
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;