devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=dca6f0756d2f3e42294b58a753e6548c3328c6b3

commit dca6f0756d2f3e42294b58a753e6548c3328c6b3
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue Jul 14 14:22:42 2015 -0400

    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.mich...@samsung.com>
---
 src/lib/ecore_wayland/ecore_wl_input.c | 6 +++---
 1 file 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
    if (!(input = data)) return;
 
    input->display->serial = serial;
+   input->pointer_focus = NULL;
 
    /* NB: Commented out for now. Not needed in most circumstances, but left
     * here for any corner-cases */
@@ -984,7 +985,6 @@ _ecore_wl_input_cb_pointer_leave(void *data, struct 
wl_pointer *pointer EINA_UNU
    if (!(win = ecore_wl_window_surface_find(surface))) return;
 
    win->pointer_device = NULL;
-   input->pointer_focus = NULL;
 
    /* _ecore_wl_input_mouse_move_send(input, win, input->timestamp); */
    _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_
    if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr);
    input->repeat.tmr = NULL;
 
+   input->keyboard_focus = NULL;
+
    if (!input->timestamp)
      {
         struct timeval tv;
@@ -1055,8 +1057,6 @@ _ecore_wl_input_cb_keyboard_leave(void *data, struct 
wl_keyboard *keyboard EINA_
 
    win->keyboard_device = NULL;
    _ecore_wl_input_focus_out_send(input, win, input->timestamp);
-
-   input->keyboard_focus = NULL;
 }
 
 static void

-- 


Reply via email to