<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 20, 2014 at 12:58 AM, Pekka Paalanen <span dir="ltr"><<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 19 Sep 2014 12:46:20 -0700<br>
Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
<br>
> On Fri, Sep 19, 2014 at 11:20 AM, Jonas Ådahl <<a href="mailto:jadahl@gmail.com">jadahl@gmail.com</a>> wrote:<br>
><br>
> > On Fri, Sep 19, 2014 at 11:00:21AM -0600, Jasper St. Pierre wrote:<br>
> > > On Fri, Sep 19, 2014 at 2:54 AM, Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com">ppaalanen@gmail.com</a>><br>
> > wrote:<br>
> > ><br>
</span><span class="">> > > > Or what if an app manually starts pointer-lock because the toolkit does<br>
> > > > not support it? This is not a use case to design for at all, but if it<br>
> > > > happens to work, it might be a nice bonus.<br>
> ><br>
> > If we make it so that locking simply locks the cursor at its position,<br>
> > it'd will just work, as the pointer cursor wouldn't move. No unexpected<br>
> > wierd wl_pointer.motion events.<br>
> ><br>
><br>
> I don't see any problem with locking only one of the available pointers.<br>
> The absolute ones simply get no motion until it's unlocked.  If we add a<br>
> set_position request to wl_relative_pointer, then I guess that would<br>
> trigger motion on the absolute pointers.  I think it's probably fine.<br>
<br>
</span>Note, that it won't be motion. It'll be a leave/enter pair, because<br>
the change in position does not come from an input device, but from<br>
software (a client). Seems ugly to me.<br></blockquote><div><br></div><div>Ok, I think I see what you mean.  More details in the next email (trying to slow down the thread explosion)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> > I think that the best would be to simply not change the position or<br>
> > state of the cursor at all. Locking would mean that while locked, the<br>
> > wl_pointer has focus, meaning the client can change the cursor, or hide<br>
> > it. For example if pointer-locking would be used to click-drag to select<br>
> > items from a list (where dragging changes highlighted element), it would<br>
> > be bad if the cursor suddenly jumps to the middle of the surface when<br>
> > done.<br>
> ><br>
> > Staying where it was at the point of locking also works the same way as<br>
> > pointer locking does in GLFW. Haven't checked SDL yet.<br>
> ><br>
> > What would a set_cursor_position argument do? It sounds like that could<br>
> > be more or less used to implement actual warping by just locking, set<br>
> > position then unlocking. It'd probably be more useful to have a<br>
> > set_cursor_position request in wl_relative_pointer that can be used when<br>
> > implementing pointer warping in Xwayland and then possibly even SDL and<br>
> > GLFW. Hmm.<br>
> ><br>
><br>
> I'm not 100% sure what you're getting at here.  However, I think we do want<br>
> to have cases where the client is drawing a warped pointer and then the the<br>
> pointer-lock breaks.  One example would be a VM that uses pointer_lock to<br>
> give relative events to the client machine.  In that case, when the you<br>
> move the pointer to the edge of the window, it sets the pointer position<br>
> and breaks the lock.  This way it looks like the pointer is simply moving<br>
> through the window.  RTS games will probably want to do similar things.  I<br>
> don't think "just lock it where it is" is always going to work.<br>
<br>
</span>Yup, this was the reason for the set-position for cursor in<br>
pointer-locked mode.<br>
<br>
Without such request, the position should stay put, not warp to<br>
middle of window or anything.<br>
<br>
<br>
Thanks,<br>
pq<br>
</blockquote></div><br></div></div>