[PATCH weston] shell: fix segfault in fullscreen binding

Jason Ekstrand jason at jlekstrand.net
Tue Jun 24 21:40:39 PDT 2014


Yes we should fix this.  I have one question below.


On Sat, Jun 7, 2014 at 2:40 AM, Boyan Ding <stu_dby at 126.com> wrote:

> Commit 9aa8ce69 'shell: Don't use the helper methods in xdg_shell
> implementations' forgot to set shsurf->fullscreen_optput in
> fullscreen_binding(), causing weston to segfault when fullscreen
> with the mod + shift + f binding. This patch fixed that issue.
> ---
>  desktop-shell/shell.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
> index dd0b2f9..56ffebf 100644
> --- a/desktop-shell/shell.c
> +++ b/desktop-shell/shell.c
> @@ -4180,6 +4180,12 @@ fullscreen_binding(struct weston_seat *seat,
> uint32_t time, uint32_t button, voi
>
>         shsurf->state_requested = true;
>         shsurf->requested_state.fullscreen = !shsurf->state.fullscreen;
> +
> +       if (shsurf->requested_state.fullscreen) {
> +               shell_surface_set_output(shsurf, NULL);
>

Why are we setting the output to null?  Prior to 9aa8ce69, it was getting
set to shsurf->recommended_output.  Was there a reason for the change to
null?  Does it not matter?

Thanks,
--Jason Ekstrand


> +               shsurf->fullscreen_output = shsurf->output;
> +       }
> +
>         send_configure_for_surface(shsurf);
>  }
>
> --
> 1.9.3
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140624/c91f1419/attachment-0001.html>


More information about the wayland-devel mailing list