discomfitor pushed a commit to branch enlightenment-0.17.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=41ed2a2079c72b378a59257ccc9c539adb74752a

commit 41ed2a2079c72b378a59257ccc9c539adb74752a
Author: Dieter Roelants <[email protected]>
Date:   Tue Nov 26 11:44:04 2013 -0500

    workaround for potential crashes when closing windows and switching desktops
    
    T322
---
 AUTHORS            |  1 +
 ChangeLog          |  4 ++++
 src/bin/e_border.c | 26 ++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)

diff --git a/AUTHORS b/AUTHORS
index 451c398..4904a1c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -50,3 +50,4 @@ Stefan Sperling <[email protected]>
 Nicolas Beaumont <[email protected]>
 David H. Bronke <[email protected]>
 Deon Thomas
+dieter.e
diff --git a/ChangeLog b/ChangeLog
index 2e36a65..43e15b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-26 dieter.e
+
+        * fixed potential crashes when switching desktops and closing windows
+
 2013-11-25 Tom Hacohen
 
        * Entry: Fixed issues with entry not scrolling to cursor.
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index 9733ef7..5e88cd0 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -5006,6 +5006,19 @@ _e_border_free(E_Border *bd)
 
         focused = NULL;
      }
+
+   if (warp_timer_border == bd)
+     {
+        warp_to = 0;
+        warp_timer_border = NULL;
+        if (warp_timer)
+          {
+             ecore_timer_del(warp_timer);
+             warp_timer = NULL;
+             e_border_focus_lock_set(EINA_FALSE);
+          }
+     }
+
    E_FREE_LIST(bd->handlers, ecore_event_handler_del);
    if (bd->remember)
      {
@@ -5114,6 +5127,7 @@ _e_border_del(E_Border *bd)
    E_Event_Border_Remove *ev;
    E_Border *child;
 
+   bd->take_focus = bd->want_focus = 0;
    if (bd == focused)
      {
         focused = NULL;
@@ -5124,6 +5138,18 @@ _e_border_del(E_Border *bd)
 
    focus_next = eina_list_remove(focus_next, bd);
 
+   if (warp_timer_border == bd)
+     {
+        warp_to = 0;
+        warp_timer_border = NULL;
+        if (warp_timer)
+          {
+             ecore_timer_del(warp_timer);
+             warp_timer = NULL;
+             e_border_focus_lock_set(EINA_FALSE);
+          }
+     }
+
    if (bd->fullscreen) bd->desk->fullscreen_borders--;
 
    if ((drag_border) && (drag_border->data == bd))

-- 


Reply via email to