devilhorns pushed a commit to branch master.

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

commit 7e5ccc3862dbf8385730b3ffc9aee0612ea62ad3
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Wed Sep 23 12:25:10 2015 -0400

    ecore-wl2: Reset pointer and keyboard focus when a window gets deleted
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/ecore_wl2_window.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index cbfb826..a64e28d 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -295,12 +295,26 @@ EAPI void
 ecore_wl2_window_free(Ecore_Wl2_Window *window)
 {
    Ecore_Wl2_Display *display;
+   Ecore_Wl2_Input *input;
 
    EINA_SAFETY_ON_NULL_RETURN(window);
 
    display = window->display;
 
-   /* TODO: reset input pointer and keyboard focus */
+   EINA_INLIST_FOREACH(display->inputs, input)
+     {
+        if ((input->focus.pointer) &&
+            (input->focus.pointer == window))
+          input->focus.pointer = NULL;
+        if ((input->focus.keyboard) &&
+            (input->focus.keyboard == window))
+          {
+             input->focus.keyboard = NULL;
+             ecore_timer_del(input->repeat.timer);
+             input->repeat.timer = NULL;
+          }
+     }
+
    /* TODO: delete window anim callback */
    /* TODO: destroy subsurfaces */
 

-- 


Reply via email to