[PATCH weston v3] simple-egl: Reset opaque region if not fullscreen.

Scott Moreau oreaus at gmail.com
Mon Nov 19 13:17:52 PST 2012


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.


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);
 
 	window->callback = wl_surface_frame(window->surface);
 	wl_callback_add_listener(window->callback, &frame_listener, window);
-- 
1.7.11.7



More information about the wayland-devel mailing list