summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-10-29 08:01:41 +0000
committerChris Michael <cp.michael@samsung.com>2013-10-29 08:05:32 +0000
commitd1d0090706274025e9be85e15eb7da7537252641 (patch)
treee3f1f7d1ee93c643b71bf6bd51a8a90e00e31e40 /src/lib/ecore_wayland
parentaa6d4a3756b8f173d091ccf9f5751b910d6a6b62 (diff)
Don't send mouse_up or mouse_down events unless we have a focused
surface Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_wayland')
-rw-r--r--src/lib/ecore_wayland/ecore_wl_input.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c
index e458d714e6..2cdc1ec773 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
469 if ((input->pointer_focus) && (!input->grab) && (state)) 469 if ((input->pointer_focus) && (!input->grab) && (state))
470 ecore_wl_input_grab(input, input->pointer_focus, button); 470 ecore_wl_input_grab(input, input->pointer_focus, button);
471 471
472 _ecore_wl_input_mouse_down_send(input, input->pointer_focus, 472 if (input->pointer_focus)
473 0, button, timestamp); 473 _ecore_wl_input_mouse_down_send(input, input->pointer_focus,
474 0, button, timestamp);
474 } 475 }
475 else 476 else
476 { 477 {
477 _ecore_wl_input_mouse_up_send(input, input->pointer_focus, 478 if (input->pointer_focus)
478 0, button, timestamp); 479 _ecore_wl_input_mouse_up_send(input, input->pointer_focus,
480 0, button, timestamp);
481
479 if ((input->grab) && (input->grab_button == button) && (!state)) 482 if ((input->grab) && (input->grab_button == button) && (!state))
480 ecore_wl_input_ungrab(input); 483 ecore_wl_input_ungrab(input);
481 } 484 }