Fix illume indicator for Klaus Kurzmann of SHR. The recent addition of
authorChristopher Michael <cpmichael1@comcast.net>
Thu, 2 Dec 2010 08:20:32 +0000 (08:20 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Thu, 2 Dec 2010 08:20:32 +0000 (08:20 +0000)
using a popup on the indicator (so that systray worked) apparently
broke things wrt full-screen apps in that the indicator would hide,
but left behind a black window. This commit fixes the issue...when we
'hide the indicator' (via illume2 message), we trap the ecore_evas
hide event and also hide the popup (same for show).

Klaus, I tested this and the issue is gone now. Let me know if you
have any other propblems.

SVN revision: 55133

src/modules/illume-indicator/e_mod_ind_win.c

index 4754a01..c6f47dc 100644 (file)
@@ -20,6 +20,8 @@ static void _e_mod_ind_win_cb_menu_pre(void *data, E_Menu *mn);
 static void _e_mod_ind_win_cb_menu_post(void *data, E_Menu *mn __UNUSED__);
 static void _e_mod_ind_win_cb_menu_contents(void *data, E_Menu *mn __UNUSED__, E_Menu_Item *mi __UNUSED__);
 static void _e_mod_ind_win_cb_menu_edit(void *data, E_Menu *mn __UNUSED__, E_Menu_Item *mi __UNUSED__);
+static void _e_mod_ind_win_cb_show(Ecore_Evas *ee);
+static void _e_mod_ind_win_cb_hide(Ecore_Evas *ee);
 
 Ind_Win *
 e_mod_ind_win_new(E_Zone *zone) 
@@ -136,6 +138,12 @@ e_mod_ind_win_new(E_Zone *zone)
    e_win_show(iwin->win);
    e_popup_show(iwin->popup);
 
+   /* setup callbacks for show/hide so we can do the proper thing with the 
+    * popup */
+   ecore_evas_data_set(iwin->win->ecore_evas, "iwin", iwin);
+   ecore_evas_callback_show_set(iwin->win->ecore_evas, _e_mod_ind_win_cb_show);
+   ecore_evas_callback_hide_set(iwin->win->ecore_evas, _e_mod_ind_win_cb_hide);
+
    /* set this window on proper zone */
    e_border_zone_set(iwin->win->border, zone);
    iwin->win->border->user_skip_winlist = 1;
@@ -539,3 +547,21 @@ _e_mod_ind_win_cb_menu_edit(void *data, E_Menu *mn __UNUSED__, E_Menu_Item *mi _
    else
      e_gadcon_edit_begin(iwin->gadcon);
 }
+
+static void 
+_e_mod_ind_win_cb_show(Ecore_Evas *ee) 
+{
+   Ind_Win *iwin;
+
+   iwin = ecore_evas_data_get(ee, "iwin");
+   e_popup_show(iwin->popup);
+}
+
+static void 
+_e_mod_ind_win_cb_hide(Ecore_Evas *ee) 
+{
+   Ind_Win *iwin;
+
+   iwin = ecore_evas_data_get(ee, "iwin");
+   e_popup_hide(iwin->popup);
+}