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

Scott Moreau oreaus at gmail.com
Mon Nov 19 10:00:28 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 Ander,

Thanks for the notice. You are right, I've removed the gratuitous region
add/remove calls.


v2:

Don't add new region to reset since the default is empty.

 clients/simple-egl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clients/simple-egl.c b/clients/simple-egl.c
index 735a9c7..9fcf064 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -437,6 +437,9 @@ 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 {
+		region = wl_compositor_create_region(window->display->compositor);
+		wl_surface_set_opaque_region(window->surface, region);
 	}
 
 	window->callback = wl_surface_frame(window->surface);
-- 
1.7.11.7



More information about the wayland-devel mailing list