compositor: Always empty the input region of the pointer surface
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Wed, 4 Jul 2012 12:48:29 +0000 (15:48 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 9 Jul 2012 21:32:46 +0000 (17:32 -0400)
Otherwise a surface.attach request might cause the input region to be
reset to the default value (the entire surface) causing it to receive
focus.

Tiago ran into this problem with xwayland.

src/compositor.c

index 677b5c8..678e0bd 100644 (file)
@@ -2145,11 +2145,12 @@ pointer_cursor_surface_configure(struct weston_surface *es,
        weston_surface_configure(seat->sprite, x, y,
                                 es->buffer->width, es->buffer->height);
 
+       empty_region(&es->input);
+
        if (!weston_surface_is_mapped(es)) {
                wl_list_insert(&es->compositor->cursor_layer.surface_list,
                               &es->layer_link);
                weston_surface_assign_output(es);
-               empty_region(&es->input);
        }
 }