Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-27 Thread Jonas Ådahl
On Wed, Sep 24, 2014 at 06:04:26PM +0200, Matthieu Gautier wrote: > Le 24/09/2014 16:41, Jason Ekstrand a écrit : > >On Wed, Sep 24, 2014 at 1:46 AM, Matthieu Gautier >> wrote: > > > >Hi Jason, > > > >Well, I'll try to be more concise. > > > >In fact, there are

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-26 Thread Bill Spitzak
On 09/26/2014 05:31 AM, Matthieu Gautier wrote: Client can't know what is the transformation matrix applied to the surface. So it can't calculate the raw event from the absolute position of the pointer. So we need to send relative/raw/untransformed events on top of absolute position. We cannot

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-26 Thread Matthieu Gautier
Le 25/09/2014 21:32, Bill Spitzak a écrit : On 09/25/2014 06:41 AM, Matthieu Gautier wrote: How do you handle transformed surfaces ? If a surface is scale by 0.5 for example. Absolute cursor seems to move twice its speed from client pov. Do we want game to turn player position quickly in th

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-25 Thread Bill Spitzak
On 09/25/2014 06:41 AM, Matthieu Gautier wrote: How do you handle transformed surfaces ? If a surface is scale by 0.5 for example. Absolute cursor seems to move twice its speed from client pov. Do we want game to turn player position quickly in this situation ? (And with rotation transformatio

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-25 Thread Matthieu Gautier
Le 24/09/2014 21:44, Bill Spitzak a écrit : On 09/24/2014 09:04 AM, Matthieu Gautier wrote: If for any reason the user move the mouse and the pointer position doesn't change (cause of pointer lock or pointer is already on a screen corner), a motion event is still generated but with surface_x/

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-24 Thread Bill Spitzak
On 09/24/2014 09:04 AM, Matthieu Gautier wrote: If for any reason the user move the mouse and the pointer position doesn't change (cause of pointer lock or pointer is already on a screen corner), a motion event is still generated but with surface_x/surface_y being the same as the previous ones.

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-24 Thread Bill Spitzak
On 09/23/2014 10:34 PM, Peter Hutterer wrote: I figured the fixed type would be used, and wrap around. At 100 units/per inch the 24.8 fixed type would wrap to where the sign changed after the mouse was moved in the same direction for 1.3 miles. I think clients can ignore this possibility, or if

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-24 Thread Jasper St. Pierre
You cannot add new events to a request or an argument. You can add a new event, but that would be double the traffic for every move. Additionally, the only time relative events are actually useful is when you can know that you will receive them beyond the bounds of your entire surface (e.g. FPS gam

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-24 Thread Matthieu Gautier
Le 24/09/2014 16:41, Jason Ekstrand a écrit : On Wed, Sep 24, 2014 at 1:46 AM, Matthieu Gautier > wrote: Hi Jason, Well, I'll try to be more concise. In fact, there are two unrelated parts in my proposition : # First part : getting relative events

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-24 Thread Jason Ekstrand
On Wed, Sep 24, 2014 at 1:46 AM, Matthieu Gautier wrote: > Hi Jason, > > Well, I'll try to be more concise. > > In fact, there are two unrelated parts in my proposition : > > # First part : getting relative events > > Passing through a wl_pointer that may not exists to get relative events > seem

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-24 Thread Matthieu Gautier
Hi Jason, Well, I'll try to be more concise. In fact, there are two unrelated parts in my proposition : # First part : getting relative events Passing through a wl_pointer that may not exists to get relative events seems a bit odd to me. My main idea is to have a new object (I've call wl_re

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-23 Thread Peter Hutterer
On Tue, Sep 23, 2014 at 04:50:19PM -0700, Bill Spitzak wrote: > > > On 09/23/2014 03:15 PM, Jason Ekstrand wrote: > >Bill, That's an interesting idea, but there are a few problems (which > >may be solvable). I do kind of like the way it completely sidesteps the > >acceleration issue. > > Thanks

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-23 Thread Peter Hutterer
On Tue, Sep 23, 2014 at 11:51:16AM -0700, Bill Spitzak wrote: > On 09/23/2014 09:01 AM, Matthieu Gautier wrote: > > >In fact, we may have a system where we have relative motion events but > >no wl_pointer. Think about a smart tv with a remote control with > >accelerator/gyroscope detectors. > >Thi

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-23 Thread Bill Spitzak
On 09/23/2014 03:15 PM, Jason Ekstrand wrote: Bill, That's an interesting idea, but there are a few problems (which may be solvable). I do kind of like the way it completely sidesteps the acceleration issue. Thanks This won't quite work. There is no such thing as an infinite datatype with

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-23 Thread Jason Ekstrand
Bill, That's an interesting idea, but there are a few problems (which may be solvable). I do kind of like the way it completely sidesteps the acceleration issue. On Tue, Sep 23, 2014 at 12:43 PM, Bill Spitzak wrote: > In any case this all sounds excessively complicated. I think this will > work

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-23 Thread Jason Ekstrand
Hi Matthieu, Could you please provide more explanation on what use-cases you are considering and why the current proposal fails to accomplish them? All I was able to get from your post was the example of a TV remote. It's all well and good to completely disagree with the proposed approach, but wi

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-23 Thread Bill Spitzak
In any case this all sounds excessively complicated. I think this will work: - Client can create a pointer_lock object from an wl_pointer. This takes a serial of an event so the compositor can decide whether it should be allowed by the event. - Motion and push/release events still come in IDE

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-23 Thread Bill Spitzak
On 09/23/2014 09:01 AM, Matthieu Gautier wrote: In fact, we may have a system where we have relative motion events but no wl_pointer. Think about a smart tv with a remote control with accelerator/gyroscope detectors. This remote may behave as a mouse, generating relative motion events. But the m

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-23 Thread Matthieu Gautier
Hello, I'm pretty new into wayland and the discussion is relatively long, so I may have missed arguments/constraints. However I would like to share my point of view. It seems to me that we are taking the problem the wrong way. Relative motions exist as soon as there is a device generating them

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-23 Thread Pekka Paalanen
On Mon, 22 Sep 2014 18:36:23 -0700 Jason Ekstrand wrote: > On Mon, Sep 22, 2014 at 12:52 PM, Jonas Ådahl wrote: > > > On Mon, Sep 22, 2014 at 11:31:27AM -0700, Jason Ekstrand wrote: > > > On Sun, Sep 21, 2014 at 11:43 PM, Pekka Paalanen > > > wrote: > > > > > > > On Sat, 20 Sep 2014 11:43:22 -

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-22 Thread Jason Ekstrand
On Mon, Sep 22, 2014 at 12:52 PM, Jonas Ådahl wrote: > On Mon, Sep 22, 2014 at 11:31:27AM -0700, Jason Ekstrand wrote: > > On Sun, Sep 21, 2014 at 11:43 PM, Pekka Paalanen > > wrote: > > > > > On Sat, 20 Sep 2014 11:43:22 -0700 > > > Jason Ekstrand wrote: > > > > > > > On Sat, Sep 20, 2014 at 1

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-22 Thread Jonas Ådahl
On Mon, Sep 22, 2014 at 11:31:27AM -0700, Jason Ekstrand wrote: > On Sun, Sep 21, 2014 at 11:43 PM, Pekka Paalanen > wrote: > > > On Sat, 20 Sep 2014 11:43:22 -0700 > > Jason Ekstrand wrote: > > > > > On Sat, Sep 20, 2014 at 1:29 AM, Pekka Paalanen > > wrote: > > > > > > > On Fri, 19 Sep 2014 2

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-22 Thread Jason Ekstrand
On Sun, Sep 21, 2014 at 11:43 PM, Pekka Paalanen wrote: > On Sat, 20 Sep 2014 11:43:22 -0700 > Jason Ekstrand wrote: > > > On Sat, Sep 20, 2014 at 1:29 AM, Pekka Paalanen > wrote: > > > > > On Fri, 19 Sep 2014 20:20:53 +0200 > > > Jonas Ådahl wrote: > > > > > > > On Fri, Sep 19, 2014 at 11:00:

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-21 Thread Pekka Paalanen
On Sat, 20 Sep 2014 11:43:22 -0700 Jason Ekstrand wrote: > On Sat, Sep 20, 2014 at 1:29 AM, Pekka Paalanen wrote: > > > On Fri, 19 Sep 2014 20:20:53 +0200 > > Jonas Ådahl wrote: > > > > > On Fri, Sep 19, 2014 at 11:00:21AM -0600, Jasper St. Pierre wrote: > > > > On Fri, Sep 19, 2014 at 2:54 AM

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-20 Thread Jason Ekstrand
On Sat, Sep 20, 2014 at 1:29 AM, Pekka Paalanen wrote: > On Fri, 19 Sep 2014 20:20:53 +0200 > Jonas Ådahl wrote: > > > On Fri, Sep 19, 2014 at 11:00:21AM -0600, Jasper St. Pierre wrote: > > > On Fri, Sep 19, 2014 at 2:54 AM, Pekka Paalanen > wrote: > > > > > > > On Fri, 19 Sep 2014 08:33:13 +02

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-20 Thread Jason Ekstrand
On Sat, Sep 20, 2014 at 12:58 AM, Pekka Paalanen wrote: > On Fri, 19 Sep 2014 12:46:20 -0700 > Jason Ekstrand wrote: > > > On Fri, Sep 19, 2014 at 11:20 AM, Jonas Ådahl wrote: > > > > > On Fri, Sep 19, 2014 at 11:00:21AM -0600, Jasper St. Pierre wrote: > > > > On Fri, Sep 19, 2014 at 2:54 AM, P

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-20 Thread Pekka Paalanen
On Fri, 19 Sep 2014 20:20:53 +0200 Jonas Ådahl wrote: > On Fri, Sep 19, 2014 at 11:00:21AM -0600, Jasper St. Pierre wrote: > > On Fri, Sep 19, 2014 at 2:54 AM, Pekka Paalanen wrote: > > > > > On Fri, 19 Sep 2014 08:33:13 +0200 > > > Jonas Ådahl wrote: > > > > > > > On Thu, Sep 18, 2014 at 10:4

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-20 Thread Pekka Paalanen
On Fri, 19 Sep 2014 11:00:21 -0600 "Jasper St. Pierre" wrote: > On Fri, Sep 19, 2014 at 2:54 AM, Pekka Paalanen wrote: > > > I don't think we ever want the compositor drawing the cursor in > > pointer-locked mode... do we? Would there be any use cases benefitting > > from it? > > > > There's a

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-20 Thread Pekka Paalanen
On Fri, 19 Sep 2014 12:46:20 -0700 Jason Ekstrand wrote: > On Fri, Sep 19, 2014 at 11:20 AM, Jonas Ådahl wrote: > > > On Fri, Sep 19, 2014 at 11:00:21AM -0600, Jasper St. Pierre wrote: > > > On Fri, Sep 19, 2014 at 2:54 AM, Pekka Paalanen > > wrote: > > > > > > > Or what if an app manually sta

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-19 Thread Jason Ekstrand
On Fri, Sep 19, 2014 at 11:20 AM, Jonas Ådahl wrote: > On Fri, Sep 19, 2014 at 11:00:21AM -0600, Jasper St. Pierre wrote: > > On Fri, Sep 19, 2014 at 2:54 AM, Pekka Paalanen > wrote: > > > > > On Fri, 19 Sep 2014 08:33:13 +0200 > > > Jonas Ådahl wrote: > > > > > > > On Thu, Sep 18, 2014 at 10:4

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-19 Thread Jonas Ådahl
On Fri, Sep 19, 2014 at 11:00:21AM -0600, Jasper St. Pierre wrote: > On Fri, Sep 19, 2014 at 2:54 AM, Pekka Paalanen wrote: > > > On Fri, 19 Sep 2014 08:33:13 +0200 > > Jonas Ådahl wrote: > > > > > On Thu, Sep 18, 2014 at 10:43:47AM -0700, Jason Ekstrand wrote: > > > > On Thu, Sep 18, 2014 at 2:

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-19 Thread Jasper St. Pierre
On Fri, Sep 19, 2014 at 2:54 AM, Pekka Paalanen wrote: > On Fri, 19 Sep 2014 08:33:13 +0200 > Jonas Ådahl wrote: > > > On Thu, Sep 18, 2014 at 10:43:47AM -0700, Jason Ekstrand wrote: > > > On Thu, Sep 18, 2014 at 2:26 AM, Pekka Paalanen > wrote: > > > > > > > On Wed, 17 Sep 2014 22:35:40 +0200

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-19 Thread Pekka Paalanen
On Fri, 19 Sep 2014 08:33:13 +0200 Jonas Ådahl wrote: > On Thu, Sep 18, 2014 at 10:43:47AM -0700, Jason Ekstrand wrote: > > On Thu, Sep 18, 2014 at 2:26 AM, Pekka Paalanen wrote: > > > > > On Wed, 17 Sep 2014 22:35:40 +0200 > > > Jonas Ådahl wrote: > > > > > > > On Wed, Sep 17, 2014 at 11:16:0

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-18 Thread Jonas Ådahl
On Thu, Sep 18, 2014 at 10:43:47AM -0700, Jason Ekstrand wrote: > On Thu, Sep 18, 2014 at 2:26 AM, Pekka Paalanen wrote: > > > On Wed, 17 Sep 2014 22:35:40 +0200 > > Jonas Ådahl wrote: > > > > > On Wed, Sep 17, 2014 at 11:16:06PM +0300, Giulio Camuffo wrote: > > > > 2014-09-17 23:11 GMT+03:00 Jo

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-18 Thread Jason Ekstrand
On Thu, Sep 18, 2014 at 2:26 AM, Pekka Paalanen wrote: > On Wed, 17 Sep 2014 22:35:40 +0200 > Jonas Ådahl wrote: > > > On Wed, Sep 17, 2014 at 11:16:06PM +0300, Giulio Camuffo wrote: > > > 2014-09-17 23:11 GMT+03:00 Jonas Ådahl : > > > > On Wed, Sep 17, 2014 at 10:56:13PM +0300, Giulio Camuffo w

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-18 Thread Pekka Paalanen
On Wed, 17 Sep 2014 21:39:51 +0200 Jonas Ådahl wrote: > Introduce a pointer lock interface and implementation. The interface > consists of a global currently called _wl_pointer_lock. It is prefixed > with an underscore (_) in order to not conflict with a potential > official protocol in Wayland,

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-18 Thread Pekka Paalanen
On Wed, 17 Sep 2014 22:35:40 +0200 Jonas Ådahl wrote: > On Wed, Sep 17, 2014 at 11:16:06PM +0300, Giulio Camuffo wrote: > > 2014-09-17 23:11 GMT+03:00 Jonas Ådahl : > > > On Wed, Sep 17, 2014 at 10:56:13PM +0300, Giulio Camuffo wrote: > > >> I haven't looked at the implementation yet, just at the

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-17 Thread Jonas Ådahl
On Wed, Sep 17, 2014 at 11:16:06PM +0300, Giulio Camuffo wrote: > 2014-09-17 23:11 GMT+03:00 Jonas Ådahl : > > On Wed, Sep 17, 2014 at 10:56:13PM +0300, Giulio Camuffo wrote: > >> I haven't looked at the implementation yet, just at the protocol, but > >> isn't _wl_pointer_lock.lock_pointer() return

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-17 Thread Giulio Camuffo
2014-09-17 23:11 GMT+03:00 Jonas Ådahl : > On Wed, Sep 17, 2014 at 10:56:13PM +0300, Giulio Camuffo wrote: >> I haven't looked at the implementation yet, just at the protocol, but >> isn't _wl_pointer_lock.lock_pointer() returning a new wl_pointer a >> problem? Objects should have a unique factory

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-17 Thread Jonas Ådahl
On Wed, Sep 17, 2014 at 10:56:13PM +0300, Giulio Camuffo wrote: > I haven't looked at the implementation yet, just at the protocol, but > isn't _wl_pointer_lock.lock_pointer() returning a new wl_pointer a > problem? Objects should have a unique factory interface, or else the > version of the interf

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-17 Thread Giulio Camuffo
I haven't looked at the implementation yet, just at the protocol, but isn't _wl_pointer_lock.lock_pointer() returning a new wl_pointer a problem? Objects should have a unique factory interface, or else the version of the interface can't be determined. -- Giulio 2014-09-17 22:39 GMT+03:00 Jonas

[PATCH weston 1/3] Introduce pointer lock interface

2014-09-17 Thread Jonas Ådahl
Introduce a pointer lock interface and implementation. The interface consists of a global currently called _wl_pointer_lock. It is prefixed with an underscore (_) in order to not conflict with a potential official protocol in Wayland, and if moving it there, the prefixed should be removed. The pro