From 25859b62f7be4fce6568538b4e6391e393d0dae8 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 23 Feb 2010 22:25:31 +0000 Subject: [PATCH] Check home count based on current mode and create or focus home window accordingly. SVN revision: 46409 --- src/modules/illume-home/e_mod_main.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/modules/illume-home/e_mod_main.c b/src/modules/illume-home/e_mod_main.c index 6c961c118..f65e9c267 100644 --- a/src/modules/illume-home/e_mod_main.c +++ b/src/modules/illume-home/e_mod_main.c @@ -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); }