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.
This commit is contained in:
Kristian Høgsberg
2012-02-23 17:30:45 -05:00
parent dd631c1c36
commit 010f98b083
8 changed files with 63 additions and 22 deletions
+3 -2
View File
@@ -1168,7 +1168,8 @@ surface_attach(struct wl_client *client,
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 @@ surface_set_input_region(struct wl_client *client,
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;