[PATCH weston] clients/simple-shm: remove unreachable function call
Daniel Stone
daniel at fooishbar.org
Mon Nov 21 09:44:42 UTC 2016
Hi Munakata-san,
On 18 November 2016 at 12:17, Ryo Munakata <ryomnktml at gmail.com> wrote:
> window->wait_for_configure should be false after dispatching more than once.
> Therefore this redraw() will never be called.
>
> Signed-off-by: Ryo Munakata <ryomnktml at gmail.com>
> ---
> clients/simple-shm.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/clients/simple-shm.c b/clients/simple-shm.c
> index 9fa2e21..04b4eff 100644
> --- a/clients/simple-shm.c
> +++ b/clients/simple-shm.c
> @@ -547,9 +547,6 @@ main(int argc, char **argv)
> wl_surface_damage(window->surface, 0, 0,
> window->width, window->height);
>
> - if (!window->wait_for_configure)
> - redraw(window, NULL, 0);
> -
> while (running && ret != -1)
> ret = wl_display_dispatch(display->display);
Hm, I don't think this is quite correct.
In create_window(), we set wait_for_configure = true, only after
creating an xdg_shell surface and committing. There is no roundtrip or
even flush at this point, so we would expect wait_for_configure to be
true, and this path to not be taken. For ivi_shell and
fullscreen_shell, we do not do this, and wait_for_configure will be
false; at this point we have not committed anything to the surface,
and the dispatch loop will not cause a redraw, as that only comes from
the frame callback. So I think this patch will break those shells.
Cheers,
Daniel
More information about the wayland-devel
mailing list