mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 16:51:31 +00:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user