summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-03-01 22:12:26 +0000
committervaxerski <vaxry@vaxry.net>2023-03-01 22:12:26 +0000
commit76fc12869d186e59cf22d51e99e2909bf1828011 (patch)
treea2476eaa95b030013dca6a5f7978ce82826b5179 /src/managers/input/InputManager.cpp
parent556c7dd51f6990ea391921cb6ee04911523e0cea (diff)
nuke cursorSI due to crashes
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 5dee3ec0..bac3b83e 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -310,16 +310,16 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
}
// if we're on an input deco, reset cursor. Don't on overriden
- if (!m_bCursorImageOverriden) {
- if (!VECINRECT(m_vLastCursorPosFloored, pFoundWindow->m_vRealPosition.vec().x, pFoundWindow->m_vRealPosition.vec().y,
- pFoundWindow->m_vRealPosition.vec().x + pFoundWindow->m_vRealSize.vec().x, pFoundWindow->m_vRealPosition.vec().y + pFoundWindow->m_vRealSize.vec().y)) {
- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
- cursorSurfaceInfo.bUsed = false;
- } else if (!cursorSurfaceInfo.bUsed) {
- cursorSurfaceInfo.bUsed = true;
- wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, cursorSurfaceInfo.pSurface, cursorSurfaceInfo.vHotspot.x, cursorSurfaceInfo.vHotspot.y);
- }
- }
+ // if (!m_bCursorImageOverriden) {
+ // if (!VECINRECT(m_vLastCursorPosFloored, pFoundWindow->m_vRealPosition.vec().x, pFoundWindow->m_vRealPosition.vec().y,
+ // pFoundWindow->m_vRealPosition.vec().x + pFoundWindow->m_vRealSize.vec().x, pFoundWindow->m_vRealPosition.vec().y + pFoundWindow->m_vRealSize.vec().y)) {
+ // wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
+ // cursorSurfaceInfo.bUsed = false;
+ // } else if (!cursorSurfaceInfo.bUsed) {
+ // cursorSurfaceInfo.bUsed = true;
+ // wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, cursorSurfaceInfo.pSurface, cursorSurfaceInfo.vHotspot.x, cursorSurfaceInfo.vHotspot.y);
+ // }
+ // }
if (*PFOLLOWMOUSE != 1 && !refocus) {
if (pFoundWindow != g_pCompositor->m_pLastWindow && g_pCompositor->m_pLastWindow &&
@@ -413,14 +413,14 @@ void CInputManager::processMouseRequest(wlr_seat_pointer_request_set_cursor_even
return;
}
- cursorSurfaceInfo.pSurface = e->surface;
+ // cursorSurfaceInfo.pSurface = e->surface;
- if (e->surface) {
- hyprListener_CursorSurfaceDestroy.removeCallback();
- hyprListener_CursorSurfaceDestroy.initCallback(
- &e->surface->events.destroy, [&](void* owner, void* data) { cursorSurfaceInfo.pSurface = nullptr; }, this, "InputManager");
- cursorSurfaceInfo.vHotspot = {e->hotspot_x, e->hotspot_y};
- }
+ // if (e->surface) {
+ // hyprListener_CursorSurfaceDestroy.removeCallback();
+ // hyprListener_CursorSurfaceDestroy.initCallback(
+ // &e->surface->events.destroy, [&](void* owner, void* data) { cursorSurfaceInfo.pSurface = nullptr; }, this, "InputManager");
+ // cursorSurfaceInfo.vHotspot = {e->hotspot_x, e->hotspot_y};
+ // }
if (e->seat_client == g_pCompositor->m_sSeat.seat->pointer_state.focused_client)
wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, e->surface, e->hotspot_x, e->hotspot_y);