Re: [PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-08 Thread Kristian Høgsberg
On Mon, Jul 08, 2013 at 04:15:07PM +0200, Giulio Camuffo wrote: > There is not much else to say. surfaces created with weston_surface_create > have > a NULL resource, and if that gets picked by default_grab_focus (in input.c) > the next > seat_get_pointer will break. > > I guess another solution c

Re: [PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-08 Thread Jason Ekstrand
On Mon, Jul 8, 2013 at 9:52 AM, Rob Bradford wrote: > On 8 July 2013 15:15, Giulio Camuffo wrote: > > Hi Giulio, > > > There is not much else to say. surfaces created with > weston_surface_create > > have > > a NULL resource, and if that gets picked by default_grab_focus (in > input.c) > > the ne

Re: [PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-08 Thread Rob Bradford
On 8 July 2013 15:15, Giulio Camuffo wrote: Hi Giulio, > There is not much else to say. surfaces created with weston_surface_create > have > a NULL resource, and if that gets picked by default_grab_focus (in input.c) > the next > seat_get_pointer will break. I guess my point is that I wanted yo

Re: [PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-08 Thread Giulio Camuffo
There is not much else to say. surfaces created with weston_surface_create have a NULL resource, and if that gets picked by default_grab_focus (in input.c) the next seat_get_pointer will break. I guess another solution could be to make weston_compositor_pick_surface not pick surfaces without a val

Re: [PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-08 Thread Rob Bradford
Can you provide some more explanation in your commit message about why the pointer might have a surface focussed but that surface does not have a valid resource. (I'm wondering if this is fixing the symptom of a problem elsewhere.) Rob On 7 July 2013 16:38, Giulio Camuffo wrote: > seat->pointer-

Re: [PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-08 Thread Jason Ekstrand
Looks good to me. --Jason Ekstrand On Jul 7, 2013 10:41 AM, "Giulio Camuffo" wrote: > seat->pointer->focus->resource can be NULL, if the surface was > created with weston_surface_create. > --- > src/input.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/input.c b/sr

[PATCH weston] input: check if the resource is valid in seat_get_pointer

2013-07-07 Thread Giulio Camuffo
seat->pointer->focus->resource can be NULL, if the surface was created with weston_surface_create. --- src/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input.c b/src/input.c index 644487a..a7a37e5 100644 --- a/src/input.c +++ b/src/input.c @@ -1181,7 +1181,7 @@ s