summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-07-14 14:22:42 -0400
committerChris Michael <cp.michael@samsung.com>2015-07-14 14:24:07 -0400
commitdca6f0756d2f3e42294b58a753e6548c3328c6b3 (patch)
tree587bd38553cc3af7609b3e4bbba3e1510510b939 /src/lib/ecore_wayland
parent8ed6417196c6d69fd546049c717cd182125bacca (diff)
ecore-wl: Reset input's pointer & keyboard focus on events
Summary: If we get pointer or keyboard leave events, then reset the Ecore_Wl_Input's idea of focus (eg: set input->pointer_focus and input->keyboard_focus fields to NULL) just in case we cannot find a window for this surface. @fix 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c
index 7813a15..2c0c74a 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -975,6 +975,7 @@ _ecore_wl_input_cb_pointer_leave(void *data, struct wl_pointer *pointer EINA_UNU
975 if (!(input = data)) return; 975 if (!(input = data)) return;
976 976
977 input->display->serial = serial; 977 input->display->serial = serial;
978 input->pointer_focus = NULL;
978 979
979 /* NB: Commented out for now. Not needed in most circumstances, but left 980 /* NB: Commented out for now. Not needed in most circumstances, but left
980 * here for any corner-cases */ 981 * here for any corner-cases */
@@ -984,7 +985,6 @@ _ecore_wl_input_cb_pointer_leave(void *data, struct wl_pointer *pointer EINA_UNU
984 if (!(win = ecore_wl_window_surface_find(surface))) return; 985 if (!(win = ecore_wl_window_surface_find(surface))) return;
985 986
986 win->pointer_device = NULL; 987 win->pointer_device = NULL;
987 input->pointer_focus = NULL;
988 988
989 /* _ecore_wl_input_mouse_move_send(input, win, input->timestamp); */ 989 /* _ecore_wl_input_mouse_move_send(input, win, input->timestamp); */
990 _ecore_wl_input_mouse_out_send(input, win, input->timestamp); 990 _ecore_wl_input_mouse_out_send(input, win, input->timestamp);
@@ -1040,6 +1040,8 @@ _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_keyboard *keyboard EINA_
1040 if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr); 1040 if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr);
1041 input->repeat.tmr = NULL; 1041 input->repeat.tmr = NULL;
1042 1042
1043 input->keyboard_focus = NULL;
1044
1043 if (!input->timestamp) 1045 if (!input->timestamp)
1044 { 1046 {
1045 struct timeval tv; 1047 struct timeval tv;
@@ -1055,8 +1057,6 @@ _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_keyboard *keyboard EINA_
1055 1057
1056 win->keyboard_device = NULL; 1058 win->keyboard_device = NULL;
1057 _ecore_wl_input_focus_out_send(input, win, input->timestamp); 1059 _ecore_wl_input_focus_out_send(input, win, input->timestamp);
1058
1059 input->keyboard_focus = NULL;
1060} 1060}
1061 1061
1062static void 1062static void