window.c: Set input region after (potentially) adjusting the surface size
authorKristian Høgsberg <krh@bitplanet.net>
Tue, 31 Jul 2012 15:59:12 +0000 (11:59 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 31 Jul 2012 15:59:12 +0000 (11:59 -0400)
Regressed in dd263e546bc20a2a7f42, spotted by Scott Moreau <oreaus@gmail.com>

clients/window.c

index a2f339f..3a746ab 100644 (file)
@@ -1252,13 +1252,6 @@ frame_resize_handler(struct widget *widget,
                allocation.width = width - decoration_width;
                allocation.height = height - decoration_height;
 
-               widget->window->input_region =
-                       wl_compositor_create_region(display->compositor);
-               wl_region_add(widget->window->input_region,
-                             t->margin, t->margin,
-                             width - 2 * t->margin,
-                             height - 2 * t->margin);
-
                opaque_margin = t->margin + t->frame_radius;
 
                wl_list_for_each(button, &frame->buttons_list, link)
@@ -1289,6 +1282,15 @@ frame_resize_handler(struct widget *widget,
        width = child->allocation.width + decoration_width;
        height = child->allocation.height + decoration_height;
 
+       if (widget->window->type != TYPE_FULLSCREEN) {
+               widget->window->input_region =
+                       wl_compositor_create_region(display->compositor);
+               wl_region_add(widget->window->input_region,
+                             t->margin, t->margin,
+                             width - 2 * t->margin,
+                             height - 2 * t->margin);
+       }
+
        widget_set_allocation(widget, 0, 0, width, height);
 
        if (child->opaque) {