summaryrefslogtreecommitdiff
path: root/src/managers/InputManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/InputManager.cpp')
-rw-r--r--src/managers/InputManager.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp
index 0718bfcc..10b1ad95 100644
--- a/src/managers/InputManager.cpp
+++ b/src/managers/InputManager.cpp
@@ -20,11 +20,18 @@ void CInputManager::onMouseWarp(wlr_pointer_motion_absolute_event* e) {
void CInputManager::mouseMoveUnified(uint32_t time) {
+ // update stuff
+ updateDragIcon();
+
+
+ // focus
wlr_surface* foundSurface = nullptr;
Vector2D mouseCoords = getMouseCoordsInternal();
+
const auto PMONITOR = g_pCompositor->getMonitorFromCursor();
if (PMONITOR)
g_pCompositor->m_pLastMonitor = PMONITOR;
+
Vector2D surfaceCoords;
Vector2D surfacePos = Vector2D(-1337, -1337);
@@ -255,4 +262,19 @@ void CInputManager::onKeyboardMod(void* data, SKeyboard* pKeyboard) {
void CInputManager::refocus() {
mouseMoveUnified(0);
+}
+
+void CInputManager::updateDragIcon() {
+ if (!g_pInputManager->m_sDrag.dragIcon)
+ return;
+
+ switch (g_pInputManager->m_sDrag.dragIcon->drag->grab_type) {
+ case WLR_DRAG_GRAB_KEYBOARD:
+ break;
+ case WLR_DRAG_GRAB_KEYBOARD_POINTER:
+ g_pInputManager->m_sDrag.pos = g_pInputManager->getMouseCoordsInternal();
+ break;
+ default:
+ break;
+ }
} \ No newline at end of file