On 11/17/2012 12:42 PM, 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 6a615d2621, when this was last fixed.
The thing was that before we relied on surface.attach to reset the
opaque region but after the introduction of surface.commit that does not
happen anymore.
---
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);
This wl_region_add() is unnecessary, a new region is already empty.
Cheers,
Ander
+ wl_surface_set_opaque_region(window->surface, region);
+ wl_region_destroy(region);
}
window->callback = wl_surface_frame(window->surface);
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel