From: Chris Michael Date: Tue, 29 Oct 2013 08:01:41 +0000 (+0000) Subject: Don't send mouse_up or mouse_down events unless we have a focused X-Git-Tag: v1.8.0-alpha1~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1d0090706274025e9be85e15eb7da7537252641;p=platform%2Fupstream%2Fefl.git Don't send mouse_up or mouse_down events unless we have a focused surface Signed-off-by: Chris Michael --- diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c index e458d71..2cdc1ec 100644 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c @@ -469,13 +469,16 @@ _ecore_wl_input_cb_pointer_button(void *data, struct wl_pointer *pointer EINA_UN if ((input->pointer_focus) && (!input->grab) && (state)) ecore_wl_input_grab(input, input->pointer_focus, button); - _ecore_wl_input_mouse_down_send(input, input->pointer_focus, - 0, button, timestamp); + if (input->pointer_focus) + _ecore_wl_input_mouse_down_send(input, input->pointer_focus, + 0, button, timestamp); } else { - _ecore_wl_input_mouse_up_send(input, input->pointer_focus, - 0, button, timestamp); + if (input->pointer_focus) + _ecore_wl_input_mouse_up_send(input, input->pointer_focus, + 0, button, timestamp); + if ((input->grab) && (input->grab_button == button) && (!state)) ecore_wl_input_ungrab(input); }