[PATCH weston] simple-egl: Reset opaque region if not fullscreen.
Scott Moreau
oreaus at gmail.com
Sat Nov 17 02:42:50 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 6a615d2621, when this was last fixed.
---
I noticed this was broken again. This patch resets the opaque region after
fullscreen toggle so the surface is restored to its original alpha.
clients/simple-egl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/clients/simple-egl.c b/clients/simple-egl.c
index 2c9a0a0..c1d701a 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -413,6 +413,11 @@ 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_region_add(region, 0, 0, 0, 0);
+ wl_surface_set_opaque_region(window->surface, region);
+ wl_region_destroy(region);
}
window->callback = wl_surface_frame(window->surface);
--
1.7.11.7
More information about the wayland-devel
mailing list