[PATCH weston v3] simple-egl: Reset opaque region if not fullscreen.
Kristian Høgsberg
hoegsberg at gmail.com
Mon Nov 19 14:26:32 PST 2012
On Mon, Nov 19, 2012 at 02:17:52PM -0700, Scott Moreau wrote:
> If simple-egl is toggled fullscreen, the opqaue region is set for the surface
> but never removed after exiting fullscreen. This patch resets the opaque region
> to 0 if the surface is not fullscreen and -o was not passed. This fixes the
> problem introduced sometime since d7f282b84e, when this was last fixed.
> ---
>
> Hi Kristian,
>
> Thanks for pointing this out. I've made it so it just passes NULL.
Nice, thanks.
>
> v3:
>
> Don't create new region, just pass NULL to reset.
>
> clients/simple-egl.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/clients/simple-egl.c b/clients/simple-egl.c
> index 735a9c7..59aa4f9 100644
> --- a/clients/simple-egl.c
> +++ b/clients/simple-egl.c
> @@ -437,7 +437,8 @@ redraw(void *data, struct wl_callback *callback, uint32_t time)
> window->geometry.height);
> wl_surface_set_opaque_region(window->surface, region);
> wl_region_destroy(region);
> - }
> + } else
> + wl_surface_set_opaque_region(window->surface, NULL);
I tweaked the formatting here to use {} for the else case too. If one
branch in an if-statement needs braces, both branches should use
braces.
Kristian
> window->callback = wl_surface_frame(window->surface);
> wl_callback_add_listener(window->callback, &frame_listener, window);
> --
> 1.7.11.7
>
> _______________________________________________
> 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