diff options
author | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> | 2014-05-14 11:00:17 +0900 |
---|---|---|
committer | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> | 2014-05-14 11:00:17 +0900 |
commit | bd2a61db01eba84c49a852338f171e5cf844308a (patch) | |
tree | 683f753c110a8b814451924c82ca07ce9f5dc9b7 /clients/window.c | |
parent | e2102cdbffd64fb0f383b2b60008d5353bbbe8d4 (diff) | |
download | weston-bd2a61db01eba84c49a852338f171e5cf844308a.tar.gz |
weston 1.4.93
Diffstat (limited to 'clients/window.c')
-rw-r--r-- | clients/window.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/clients/window.c b/clients/window.c index f12ce396..4592ef96 100644 --- a/clients/window.c +++ b/clients/window.c @@ -2605,10 +2605,15 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer, return; } + window = wl_surface_get_user_data(surface); + if (surface != window->main_surface->surface) { + DBG("Ignoring input event from subsurface %p\n", surface); + return; + } + input->display->serial = serial; input->pointer_enter_serial = serial; - input->pointer_focus = wl_surface_get_user_data(surface); - window = input->pointer_focus; + input->pointer_focus = window; if (window->resizing) { window->resizing = 0; @@ -2644,12 +2649,12 @@ pointer_handle_motion(void *data, struct wl_pointer *pointer, float sx = wl_fixed_to_double(sx_w); float sy = wl_fixed_to_double(sy_w); - input->sx = sx; - input->sy = sy; - if (!window) return; + input->sx = sx; + input->sy = sy; + /* when making the window smaller - e.g. after a unmaximise we might * still have a pending motion event that the compositor has picked * based on the old surface dimensions @@ -2979,6 +2984,12 @@ touch_handle_down(void *data, struct wl_touch *wl_touch, return; } + if (surface != input->touch_focus->main_surface->surface) { + DBG("Ignoring input event from subsurface %p\n", surface); + input->touch_focus = NULL; + return; + } + if (input->grab) widget = input->grab; else |