[client] core: simplify core_setCursorInView logic

We don't need any of that weird grabPointer stuff now that we have absolute
input. Deleting this will allow Wayland to advertise warp support without
doing any of the nasty confining stuff on grab/release.
This commit is contained in:
Quantum
2026-08-08 14:47:30 -04:00
committed by Geoffrey McRae
parent 9f2d6f6413
commit 70ae98491d

View File

@@ -218,41 +218,8 @@ void core_setCursorInView(bool enable)
return;
}
enum LG_DSWarpSupport warpSupport = LG_DS_WARP_NONE;
app_getProp(LG_DS_WARP_SUPPORT, &warpSupport);
const bool immediate = g_cursor.grab || g_params.captureInputOnly ||
warpSupport == LG_DS_WARP_NONE;
if (g_cursor.viewReq == enable)
{
if (immediate)
applyView(enable, false);
else if (enable && !g_cursor.inView)
{
g_state.ds->grabPointer();
applyView(g_state.ds->isPointerGrabbed(), false);
}
else
MTRACE("view skip=same value=%d", enable);
return;
}
g_cursor.viewReq = enable;
if (immediate)
{
applyView(enable, false);
return;
}
if (enable)
{
g_state.ds->grabPointer();
applyView(g_state.ds->isPointerGrabbed(), false);
}
else
g_state.ds->ungrabPointer();
}
void core_handleGrabEvent(bool active)