Re: [PATCH] shell: Fix crash when an input panel is hiding

2012-09-25 Thread Kristian Høgsberg
On Wed, Sep 19, 2012 at 02:31:57PM +0200, Jan Arne Petersen wrote:
> From: Jan Arne Petersen 
> 
> Do not call weston_slide_run when the surface's output is NULL.
> ---
>  src/shell.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/shell.c b/src/shell.c
> index 2afa1b3..8dc6f50 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -2765,7 +2765,8 @@ show_input_panels(struct wl_listener *listener, void 
> *data)
>  &ws->layer_link);
>   weston_surface_update_transform(ws);
>   weston_surface_damage(ws);
> - weston_slide_run(ws, ws->geometry.height, 0, NULL, NULL);
> + if (ws->output)
> + weston_slide_run(ws, ws->geometry.height, 0, NULL, 
> NULL);

We should always have an output at this point, since
weston_surface_update_transform() sets that based on the surface
position.  But since the slide starts off-screen, maybe it fails to
find an output, not sure... we'd have to try to figure out why it's
NULL.

Kristian

>   }
>  }
>  
> -- 
> 1.7.11.4
> 
> ___
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH] shell: Fix crash when an input panel is hiding

2012-09-21 Thread Jan Arne Petersen
I figured out there is also another problem with the output of input
panels which will result in a crash in input_panel_configure, so I think
we better fix it properly.

On 09/19/2012 02:31 PM, Jan Arne Petersen wrote:
> From: Jan Arne Petersen 
> 
> Do not call weston_slide_run when the surface's output is NULL.
> ---
>  src/shell.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/shell.c b/src/shell.c
> index 2afa1b3..8dc6f50 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -2765,7 +2765,8 @@ show_input_panels(struct wl_listener *listener, void 
> *data)
>  &ws->layer_link);
>   weston_surface_update_transform(ws);
>   weston_surface_damage(ws);
> - weston_slide_run(ws, ws->geometry.height, 0, NULL, NULL);
> + if (ws->output)
> + weston_slide_run(ws, ws->geometry.height, 0, NULL, 
> NULL);
>   }
>  }
>  
> 

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel