[PATCH weston] shell: fix segfault in fullscreen binding

Boyan Ding stu_dby at 126.com
Tue Jun 24 23:00:45 PDT 2014


On Tue, 2014-06-24 at 21:40 -0700, Jason Ekstrand wrote:
> Yes we should fix this.  I have one question below.
Actually I'm not very sure about that either, maybe we should ask
@Jasper for suggestion.

> 
> 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
> 
> 





More information about the wayland-devel mailing list