fix 2 pointer warp bugs:
* warping to a window which is covered by another window containing the current pointer coordinates * focus changes no longer break sometimes when winlist warping very quickly SVN revision: 84046
This commit is contained in:
parent
90de0907c2
commit
b247247dfd
|
@ -1,6 +1,7 @@
|
||||||
2013-02-18 Mike Blumenkrantz
|
2013-02-18 Mike Blumenkrantz
|
||||||
|
|
||||||
* fixed disable of input methods in input method config dialog
|
* fixed disable of input methods in input method config dialog
|
||||||
|
* fixed pointer warp when pointer was inside warp window but not directly over it
|
||||||
|
|
||||||
2013-02-13 Deon Thomas
|
2013-02-13 Deon Thomas
|
||||||
|
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -173,3 +173,4 @@ Fixes:
|
||||||
* fix crash when locking screen from Start gadget and then activating gadget again
|
* fix crash when locking screen from Start gadget and then activating gadget again
|
||||||
* fixed bug where e_layout would ignore frozen state and crash
|
* fixed bug where e_layout would ignore frozen state and crash
|
||||||
* fixed disable of input methods in input method config dialog
|
* fixed disable of input methods in input method config dialog
|
||||||
|
* fixed pointer warp when pointer was inside warp window but not directly over it
|
||||||
|
|
|
@ -10185,23 +10185,11 @@ e_border_focus_track_thaw(void)
|
||||||
focus_track_frozen--;
|
focus_track_frozen--;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Border *
|
static E_Border *
|
||||||
e_border_under_pointer_get(E_Desk *desk,
|
_e_border_under_pointer_helper(E_Desk *desk, E_Border *exclude, int x, int y)
|
||||||
E_Border *exclude)
|
|
||||||
{
|
{
|
||||||
E_Border *bd = NULL, *cbd;
|
E_Border *bd = NULL, *cbd;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
int x, y;
|
|
||||||
|
|
||||||
/* We need to ensure that we can get the container window for the
|
|
||||||
* zone of either the given desk or the desk of the excluded
|
|
||||||
* window, so return if neither is given */
|
|
||||||
if (desk)
|
|
||||||
ecore_x_pointer_xy_get(desk->zone->container->win, &x, &y);
|
|
||||||
else if (exclude)
|
|
||||||
ecore_x_pointer_xy_get(exclude->desk->zone->container->win, &x, &y);
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_border_raise_stack_get(), l, cbd)
|
EINA_LIST_FOREACH(e_border_raise_stack_get(), l, cbd)
|
||||||
{
|
{
|
||||||
|
@ -10223,6 +10211,25 @@ e_border_under_pointer_get(E_Desk *desk,
|
||||||
return bd;
|
return bd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI E_Border *
|
||||||
|
e_border_under_pointer_get(E_Desk *desk,
|
||||||
|
E_Border *exclude)
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
/* We need to ensure that we can get the container window for the
|
||||||
|
* zone of either the given desk or the desk of the excluded
|
||||||
|
* window, so return if neither is given */
|
||||||
|
if (desk)
|
||||||
|
ecore_x_pointer_xy_get(desk->zone->container->win, &x, &y);
|
||||||
|
else if (exclude)
|
||||||
|
ecore_x_pointer_xy_get(exclude->desk->zone->container->win, &x, &y);
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return _e_border_under_pointer_helper(desk, exclude, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_border_pointer_warp_to_center_timer(void *data __UNUSED__)
|
_e_border_pointer_warp_to_center_timer(void *data __UNUSED__)
|
||||||
{
|
{
|
||||||
|
@ -10298,9 +10305,6 @@ e_border_pointer_warp_to_center_now(E_Border *bd)
|
||||||
if (e_config->disable_all_pointer_warps) return 0;
|
if (e_config->disable_all_pointer_warps) return 0;
|
||||||
if (warp_timer_border == bd)
|
if (warp_timer_border == bd)
|
||||||
{
|
{
|
||||||
if (warp_timer) ecore_timer_del(warp_timer);
|
|
||||||
warp_timer = NULL;
|
|
||||||
warp_timer_border = NULL;
|
|
||||||
ecore_x_pointer_warp(warp_to_win, warp_to_x, warp_to_y);
|
ecore_x_pointer_warp(warp_to_win, warp_to_x, warp_to_y);
|
||||||
warp_to = 0;
|
warp_to = 0;
|
||||||
}
|
}
|
||||||
|
@ -10316,6 +10320,7 @@ EAPI int
|
||||||
e_border_pointer_warp_to_center(E_Border *bd)
|
e_border_pointer_warp_to_center(E_Border *bd)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
E_Border *cbd = NULL;
|
||||||
|
|
||||||
if (e_config->disable_all_pointer_warps) return 0;
|
if (e_config->disable_all_pointer_warps) return 0;
|
||||||
/* Only warp the pointer if it is not already in the area of
|
/* Only warp the pointer if it is not already in the area of
|
||||||
|
@ -10323,7 +10328,10 @@ e_border_pointer_warp_to_center(E_Border *bd)
|
||||||
ecore_x_pointer_xy_get(bd->zone->container->win, &x, &y);
|
ecore_x_pointer_xy_get(bd->zone->container->win, &x, &y);
|
||||||
if ((x >= bd->x) && (x <= (bd->x + bd->w)) &&
|
if ((x >= bd->x) && (x <= (bd->x + bd->w)) &&
|
||||||
(y >= bd->y) && (y <= (bd->y + bd->h)))
|
(y >= bd->y) && (y <= (bd->y + bd->h)))
|
||||||
return 0;
|
{
|
||||||
|
cbd = _e_border_under_pointer_helper(bd->desk, bd, x, y);
|
||||||
|
if (cbd == bd) return 0;
|
||||||
|
}
|
||||||
|
|
||||||
warp_to_x = bd->x + (bd->w / 2);
|
warp_to_x = bd->x + (bd->w / 2);
|
||||||
if (warp_to_x < (bd->zone->x + 1))
|
if (warp_to_x < (bd->zone->x + 1))
|
||||||
|
@ -10337,6 +10345,15 @@ e_border_pointer_warp_to_center(E_Border *bd)
|
||||||
else if (warp_to_y > (bd->zone->y + bd->zone->h))
|
else if (warp_to_y > (bd->zone->y + bd->zone->h))
|
||||||
warp_to_y = (bd->zone->y + bd->zone->h + bd->y) / 2;
|
warp_to_y = (bd->zone->y + bd->zone->h + bd->y) / 2;
|
||||||
|
|
||||||
|
/* TODO: handle case where another border is over the exact center,
|
||||||
|
* find a place where the requested border is not overlapped?
|
||||||
|
*
|
||||||
|
if (!cbd) cbd = _e_border_under_pointer_helper(bd->desk, bd, x, y);
|
||||||
|
if (cbd != bd)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
warp_to = 1;
|
warp_to = 1;
|
||||||
warp_to_win = bd->zone->container->win;
|
warp_to_win = bd->zone->container->win;
|
||||||
ecore_x_pointer_xy_get(bd->zone->container->win, &warp_x[0], &warp_y[0]);
|
ecore_x_pointer_xy_get(bd->zone->container->win, &warp_x[0], &warp_y[0]);
|
||||||
|
|
Loading…
Reference in New Issue