summaryrefslogtreecommitdiff
path: root/src/input.c
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2014-01-31 16:07:51 +0200
committerKristian Høgsberg <krh@bitplanet.net>2014-02-01 01:12:24 -0800
commit23900f70e57277805db652316b76d18b2d59281c (patch)
tree723dc00355e3a1621e4271c950371874c150be5c /src/input.c
parentcd31275f28b0a04d2ec5426dc81e875197b47e52 (diff)
input: Empty the current input region when configuring pointer surfaces
The input region of the cursor surface is set to empty in pointer_cursor_surface_configure(). Since during the commit process this function is called before the pending input region is made current, it empties surface->pending.input instead of surface->input. But pointer_cursor_surface_configure() is also called from pointer_set_cursor() in order to map the cursor even if there isn't a subsequent attach and commit to the cursor surface. In that case, surface->input is never emptied, since the configure function emptied only the pending input region and there wasn't a commit that made it effective. Fix this by emptying both pending and current input regions. The latter shouldn't cause problems since the surface can't have a role prior to being assigned the cursor role, so it shouldn't be mapped in the first place. Also change toytoolkit so that it triggers the bug. https://bugs.freedesktop.org/show_bug.cgi?id=73711
Diffstat (limited to 'src/input.c')
-rw-r--r--src/input.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/input.c b/src/input.c
index 3f93e552..f7ae47d2 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1529,6 +1529,7 @@ pointer_cursor_surface_configure(struct weston_surface *es,
weston_view_set_position(pointer->sprite, x, y);
empty_region(&es->pending.input);
+ empty_region(&es->input);
if (!weston_surface_is_mapped(es)) {
wl_list_insert(&es->compositor->cursor_layer.view_list,