mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 05:06:00 +01:00
nuke cursorSI due to crashes
This commit is contained in:
parent
556c7dd51f
commit
76fc12869d
2 changed files with 26 additions and 29 deletions
|
@ -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 we're on an input deco, reset cursor. Don't on overriden
|
||||||
if (!m_bCursorImageOverriden) {
|
// if (!m_bCursorImageOverriden) {
|
||||||
if (!VECINRECT(m_vLastCursorPosFloored, pFoundWindow->m_vRealPosition.vec().x, pFoundWindow->m_vRealPosition.vec().y,
|
// 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)) {
|
// 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);
|
// wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
|
||||||
cursorSurfaceInfo.bUsed = false;
|
// cursorSurfaceInfo.bUsed = false;
|
||||||
} else if (!cursorSurfaceInfo.bUsed) {
|
// } else if (!cursorSurfaceInfo.bUsed) {
|
||||||
cursorSurfaceInfo.bUsed = true;
|
// cursorSurfaceInfo.bUsed = true;
|
||||||
wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, cursorSurfaceInfo.pSurface, cursorSurfaceInfo.vHotspot.x, cursorSurfaceInfo.vHotspot.y);
|
// wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, cursorSurfaceInfo.pSurface, cursorSurfaceInfo.vHotspot.x, cursorSurfaceInfo.vHotspot.y);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (*PFOLLOWMOUSE != 1 && !refocus) {
|
if (*PFOLLOWMOUSE != 1 && !refocus) {
|
||||||
if (pFoundWindow != g_pCompositor->m_pLastWindow && g_pCompositor->m_pLastWindow &&
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cursorSurfaceInfo.pSurface = e->surface;
|
// cursorSurfaceInfo.pSurface = e->surface;
|
||||||
|
|
||||||
if (e->surface) {
|
// if (e->surface) {
|
||||||
hyprListener_CursorSurfaceDestroy.removeCallback();
|
// hyprListener_CursorSurfaceDestroy.removeCallback();
|
||||||
hyprListener_CursorSurfaceDestroy.initCallback(
|
// hyprListener_CursorSurfaceDestroy.initCallback(
|
||||||
&e->surface->events.destroy, [&](void* owner, void* data) { cursorSurfaceInfo.pSurface = nullptr; }, this, "InputManager");
|
// &e->surface->events.destroy, [&](void* owner, void* data) { cursorSurfaceInfo.pSurface = nullptr; }, this, "InputManager");
|
||||||
cursorSurfaceInfo.vHotspot = {e->hotspot_x, e->hotspot_y};
|
// cursorSurfaceInfo.vHotspot = {e->hotspot_x, e->hotspot_y};
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (e->seat_client == g_pCompositor->m_sSeat.seat->pointer_state.focused_client)
|
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);
|
wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, e->surface, e->hotspot_x, e->hotspot_y);
|
||||||
|
|
|
@ -7,21 +7,18 @@
|
||||||
#include "../../helpers/Timer.hpp"
|
#include "../../helpers/Timer.hpp"
|
||||||
#include "InputMethodRelay.hpp"
|
#include "InputMethodRelay.hpp"
|
||||||
|
|
||||||
enum eClickBehaviorMode
|
enum eClickBehaviorMode {
|
||||||
{
|
|
||||||
CLICKMODE_DEFAULT = 0,
|
CLICKMODE_DEFAULT = 0,
|
||||||
CLICKMODE_KILL
|
CLICKMODE_KILL
|
||||||
};
|
};
|
||||||
|
|
||||||
enum eMouseBindMode
|
enum eMouseBindMode {
|
||||||
{
|
|
||||||
MBIND_INVALID = -1,
|
MBIND_INVALID = -1,
|
||||||
MBIND_MOVE = 0,
|
MBIND_MOVE = 0,
|
||||||
MBIND_RESIZE
|
MBIND_RESIZE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum eBorderIconDirection
|
enum eBorderIconDirection {
|
||||||
{
|
|
||||||
BORDERICON_NONE,
|
BORDERICON_NONE,
|
||||||
BORDERICON_UP,
|
BORDERICON_UP,
|
||||||
BORDERICON_DOWN,
|
BORDERICON_DOWN,
|
||||||
|
@ -214,12 +211,12 @@ class CInputManager {
|
||||||
void setCursorIconOnBorder(CWindow* w);
|
void setCursorIconOnBorder(CWindow* w);
|
||||||
|
|
||||||
// cursor surface
|
// cursor surface
|
||||||
struct cursorSI {
|
// struct cursorSI {
|
||||||
wlr_surface* pSurface = nullptr;
|
// wlr_surface* pSurface = nullptr;
|
||||||
Vector2D vHotspot;
|
// Vector2D vHotspot;
|
||||||
bool bUsed = false;
|
// bool bUsed = false;
|
||||||
} cursorSurfaceInfo;
|
// } cursorSurfaceInfo;
|
||||||
DYNLISTENER(CursorSurfaceDestroy);
|
// DYNLISTENER(CursorSurfaceDestroy);
|
||||||
|
|
||||||
friend class CKeybindManager;
|
friend class CKeybindManager;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue