add minor optimization for e_manager_current_get for most common case

there's only more than one manager when we're running true multi-head, which is pretty rare/non-existent with compositing, so we can avoid an X call here by just returning the only possible manager
This commit is contained in:
Mike Blumenkrantz 2013-10-07 03:52:09 +01:00
parent 0b463d2d1a
commit 5fb09a0249
1 changed files with 2 additions and 0 deletions

View File

@ -455,6 +455,8 @@ e_manager_current_get(void)
int x, y;
if (!managers) return NULL;
if (eina_list_count(managers) == 1)
return eina_list_data_get(managers);
EINA_LIST_FOREACH(managers, l, man)
{
ecore_x_pointer_xy_get(man->win, &x, &y);