> > I've written a test for this here: > http://codeflow.org/issues/software-cursor.html > > My observation from testing on linux is that I can't distinguish latency > for the software cursor from the OS cursor (or not by much anyway) in > google chrome. In firefox however there's noticable lag. Mileage may vary > for other platforms. >
This is true, but sadly your test runs on an empty animation frame. If your main thread is doing a lot of work already (barely hitting the 60fps mark, as it is the case for demanding games), the lag will be much more perceptible as you will most likely drop a frame every now and then. The reason the cursor is hidden when the pointer is locked is that some > OSes don't have the ability to report relative mouse movement correctly at > screen edges. This requires the cursors to constantly be reset to the > center of the screen, which obviously would look strange if the cursor was > visible. Would that prevent vendors from implementing a pointer "edge grabbing"? (preventing the cursor to exit the window but keeping the OS cursor as-is while inside of it) On Sun, Feb 23, 2014 at 7:30 AM, Florian Bösch <pya...@gmail.com> wrote: > On Sun, Feb 23, 2014 at 4:18 PM, Brandon Jones <bajo...@google.com> wrote: > >> - it's possible to theme the OS cursor using custom images with CSS. >> https://developer.mozilla.org/en-US/docs/Web/CSS/cursor/url >> > Although that doesn't absolve vendors from fixing the latency issue even > if native pointers where to be made available during pointerlock. The > reason is that cursors come in more flavors than an image. For example they > could come in some variety of 3D rendered representations useful for the > game in question. > > >> - The reason the cursor is hidden when the pointer is locked is that some >> OSes don't have the ability to report relative mouse movement correctly at >> screen edges. This requires the cursors to constantly be reset to the >> center of the screen, which obviously would look strange if the cursor was >> visible. >> > Isn't that only a concern if you want to capture the cursor, not when you > display the OS cursor? > > >> - You already mentioned some issues with synthetic mouse events, but >> unfortunately it's worse than you suspect. For example: sending a synthetic >> click event to a checkbox doesn't actually change it's checked state. (Not >> the last time I tried anyway) select controls also have a hard time with >> synthetic events, and there's a whole host of other sub rely broken things. >> :( >> > Is there a motivation not to make it work? Clickjacking? >