aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-04 15:11:53 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-04 15:11:53 +0000
commit17c9b707d50ca864acb075c7a93bfcae17fbe7e6 (patch)
tree1b9c31427cd899d448b78ed1d2cf5da32594fe7f
parent3bd8f4dd81b8f42c192f18a41f70a6a0c6f4808b (diff)
downloadenlightenment-17c9b707d50ca864acb075c7a93bfcae17fbe7e6.tar.gz
enlightenment-17c9b707d50ca864acb075c7a93bfcae17fbe7e6.tar.xz
enlightenment-17c9b707d50ca864acb075c7a93bfcae17fbe7e6.zip
fix focus_revert_on_hide_or_close option to work correctly with mouse focus, also fix annoying pointer warp focus bug which erroneously focused windows while moving the pointer for pointer_slide warps on new windows
SVN revision: 80174
-rw-r--r--src/bin/e_border.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index 509015770..c24661eb3 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -1047,22 +1047,15 @@ e_border_hide(E_Border *bd,
e_border_focus_set(bd->parent, 1, 1);
else if (e_config->focus_revert_on_hide_or_close)
{
- /* When using pointer focus, the border under the
- * pointer (if any) gets focused, in sloppy/click
- * focus the last focused window on the current
- * desk gets focus */
- if (e_config->focus_policy == E_FOCUS_MOUSE)
- {
- pbd = e_border_under_pointer_get(desk, bd);
- if (pbd)
- e_border_focus_set(pbd, 1, 1);
- }
- else
- {
- e_desk_last_focused_focus(desk);
- if ((pbd = eina_list_data_get(focus_next)))
- e_border_pointer_warp_to_center(pbd);
- }
+ e_desk_last_focused_focus(desk);
+ if ((pbd = eina_list_data_get(focus_next)))
+ e_border_pointer_warp_to_center(pbd);
+ }
+ else if (e_config->focus_policy == E_FOCUS_MOUSE)
+ {
+ pbd = e_border_under_pointer_get(desk, bd);
+ if (pbd)
+ e_border_focus_set(pbd, 1, 1);
}
}
}
@@ -4470,6 +4463,7 @@ _e_border_reset_lost_window(E_Border *bd)
e_border_focus_set(bd, 1, 1);
bd->during_lost = EINA_FALSE;
+ e_border_focus_lock_set(EINA_TRUE);
}
EAPI void
@@ -9910,6 +9904,7 @@ _e_border_pointer_warp_to_center_timer(void *data __UNUSED__)
cleanup:
ecore_timer_del(warp_timer);
warp_timer = NULL;
+ e_border_focus_lock_set(EINA_FALSE);
return ECORE_CALLBACK_CANCEL;
}
@@ -9945,6 +9940,7 @@ e_border_pointer_warp_to_center(E_Border *bd)
ecore_x_pointer_xy_get(bd->zone->container->win, &warp_x, &warp_y);
if (warp_timer) ecore_timer_del(warp_timer);
warp_timer = ecore_timer_add(0.01, _e_border_pointer_warp_to_center_timer, (const void *)bd);
+ e_border_focus_lock_set(EINA_TRUE);
return 1;
}