forked from enlightenment/enlightenment
Spped up 'home' detection a bit by checking window types and ignoring
ones we know are are not 'homes' (splash, menu, etc). Check border position before checking border type (faster to see if it's even in the position first). SVN revision: 50882
This commit is contained in:
parent
f359974105
commit
f63091eac3
|
@ -239,6 +239,12 @@ e_illume_border_is_home(E_Border *bd)
|
|||
/* make sure we have a border */
|
||||
if (!bd) return EINA_FALSE;
|
||||
|
||||
/* skip windows which are not either 'normal' windows, or 'unknown' windows
|
||||
* NB: Let 'unknown' windows pass through as a safety */
|
||||
if ((bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NORMAL) &&
|
||||
(bd->client.netwm.type != ECORE_X_WINDOW_TYPE_UNKNOWN))
|
||||
return EINA_FALSE;
|
||||
|
||||
/* check if we are matching on name */
|
||||
if (_e_illume_cfg->policy.home.match.name)
|
||||
{
|
||||
|
@ -492,6 +498,9 @@ e_illume_border_at_xy_get(E_Zone *zone, int x, int y)
|
|||
/* skip invisibles */
|
||||
if (!bd->visible) continue;
|
||||
|
||||
/* check position against given coordinates */
|
||||
if ((bd->x != x) || (bd->y != y)) continue;
|
||||
|
||||
/* filter out borders we don't want */
|
||||
if (e_illume_border_is_indicator(bd)) continue;
|
||||
if (e_illume_border_is_softkey(bd)) continue;
|
||||
|
@ -499,9 +508,6 @@ e_illume_border_at_xy_get(E_Zone *zone, int x, int y)
|
|||
if (e_illume_border_is_quickpanel(bd)) continue;
|
||||
if (e_illume_border_is_home(bd)) continue;
|
||||
|
||||
/* check position against given coordinates */
|
||||
if ((bd->x != x) || (bd->y != y)) continue;
|
||||
|
||||
/* found one, return it */
|
||||
return bd;
|
||||
}
|
||||
|
@ -658,13 +664,11 @@ e_illume_border_indicator_pos_get(E_Zone *zone, int *x, int *y)
|
|||
{
|
||||
E_Border *ind;
|
||||
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
|
||||
/* make sure we have a zone */
|
||||
if (!zone)
|
||||
{
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
return;
|
||||
}
|
||||
if (!zone) return;
|
||||
|
||||
/* set default values */
|
||||
if (x) *x = zone->x;
|
||||
|
@ -732,15 +736,13 @@ e_illume_border_softkey_pos_get(E_Zone *zone, int *x, int *y)
|
|||
{
|
||||
E_Border *sft;
|
||||
|
||||
/* make sure we have a zone */
|
||||
if (!zone)
|
||||
{
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
return;
|
||||
}
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
|
||||
/* set default values */
|
||||
/* make sure we have a zone */
|
||||
if (!zone) return;
|
||||
|
||||
/* set default values */
|
||||
if (x) *x = zone->x;
|
||||
if (y) *y = zone->y;
|
||||
|
||||
|
@ -762,7 +764,7 @@ e_illume_border_softkey_pos_get(E_Zone *zone, int *x, int *y)
|
|||
EAPI E_Illume_Keyboard *
|
||||
e_illume_keyboard_get(void)
|
||||
{
|
||||
/* make sure we have a keyboard and a zone */
|
||||
/* make sure we have a keyboard */
|
||||
if (!_e_illume_kbd) return NULL;
|
||||
|
||||
/* return the keyboard */
|
||||
|
@ -788,15 +790,13 @@ e_illume_keyboard_get(void)
|
|||
EAPI void
|
||||
e_illume_keyboard_safe_app_region_get(E_Zone *zone, int *x, int *y, int *w, int *h)
|
||||
{
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
|
||||
/* make sure we have a zone */
|
||||
if (!zone)
|
||||
{
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
return;
|
||||
}
|
||||
if (!zone) return;
|
||||
|
||||
/* set default values */
|
||||
if (x) *x = zone->x;
|
||||
|
|
Loading…
Reference in New Issue