window: Track and report input and opaque regions
We just set the input region to the bounding box of the window frame
and set the opaque region to be the opaque rectangle inside the window
if the child widget is opaque.
diff --git a/src/compositor.c b/src/compositor.c
index b45a818..80ee2ba 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1168,7 +1168,8 @@
if (es->geometry.width != buffer->width ||
es->geometry.height != buffer->height) {
undef_region(&es->input);
- undef_region(&es->opaque);
+ pixman_region32_fini(&es->opaque);
+ pixman_region32_init(&es->opaque);
}
if (es->output == NULL) {
@@ -1268,7 +1269,7 @@
struct wl_resource *region_resource)
{
struct weston_surface *surface = resource->data;
- struct weston_region *region = region_resource->data;
+ struct weston_region *region;
if (region_resource) {
region = region_resource->data;