Re: [whatwg/fullscreen] Option to "trap" the cursor inside the fullscreen window (#99)

This is an old feature request becoming more relevant now that there are more implementations of Pointer Lock. It's worth revisiting, but needs to be prioritized against other input work.

I called it "Pointer Clip" in Pointer Lock's [Features to be considered for Next Version](https://github.com/w3c/pointerlock/blob/gh-pages/FeatureRequests.md#pointer-clip-limiting-movement-of-the-cursor-without-hiding-it). It wasn't acted on earlier because a) opportunity cost -- just didn't out prioritize other work and b) there is a workaround, Pointer Lock with an application drawn cursor does work, but I certainly grant that the lag makes for a poorer experience.

The implementation complexity was, (from memory 6 years ago), primarily around arbitrary rectangles on Linux systems. Especially with possibility of moving windows, this was harder. Also, note that compared to games which typically lock the entire window, we may want a web API that locks to a DOM element and works like MSs [ClipCursor](https://msdn.microsoft.com/en-us/library/windows/desktop/ms648383(v=vs.85).aspx)

Limiting to the fullscreen case would be simpler, but I think a 'local maxima' of a feature. Plenty of games  and other applications would benefit from a) being able to lock when not fullscreen and b) locking cursor to only a portion of the screen.

cc @dtapuska 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/issues/99#issuecomment-323818915

Received on Monday, 21 August 2017 18:35:24 UTC