Check home count based on current mode and create or focus home window

accordingly.



SVN revision: 46409
This commit is contained in:
Christopher Michael 2010-02-23 22:25:31 +00:00
parent 7a79cfc933
commit 25859b62f7
1 changed files with 13 additions and 5 deletions

View File

@ -278,18 +278,26 @@ static void
_il_home_btn_cb_click(void *data, void *data2)
{
Instance *inst;
E_Zone *zone;
Ecore_X_Illume_Mode mode;
int hcount = 0;
if (!(inst = data)) return;
/* we need to check current illume mode here first */
zone = inst->gcc->gadcon->zone;
mode = ecore_x_e_illume_mode_get(zone->black_win);
if (mode <= ECORE_X_ILLUME_MODE_SINGLE)
hcount = 1;
else
hcount = 2;
/* if there are less than 2 home windows, create a new one */
if (eina_list_count(inst->wins) < 2)
if (eina_list_count(inst->wins) < hcount)
_il_home_win_new(inst);
else
{
E_Zone *zone;
zone = inst->gcc->gadcon->zone;
/* already 2 home windows, so tell illume to focus one */
ecore_x_e_illume_focus_home_send(zone->black_win);
}