okra pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=cf1d083b38267ea0a8dff3882660d6a03981ac03

commit cf1d083b38267ea0a8dff3882660d6a03981ac03
Author: Stephen 'Okra' Houston <smhousto...@gmail.com>
Date:   Tue Jan 10 15:45:13 2017 -0600

    Enlightenment: Fix luncher to not duplicate clients who report as both 
having and not having a .desktop.
---
 src/modules/luncher/bar.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c
index f3e86bf..86894d4 100644
--- a/src/modules/luncher/bar.c
+++ b/src/modules/luncher/bar.c
@@ -4,6 +4,7 @@ static Evas_Object *current_preview;
 static Eina_Bool current_preview_menu;
 static Eina_Bool _bar_icon_preview_show(void *data);
 static Eina_Bool _bar_icon_preview_hide(void *data);
+static void      _bar_icon_del(Instance *inst, Icon *ic);
 
 static void
 _bar_aspect(Instance *inst)
@@ -143,7 +144,7 @@ _bar_location_get(Instance *inst)
 static Icon *
 _bar_icon_match(Instance *inst, E_Client *ec)
 {
-   Icon *ic = NULL;
+   Icon *ic = NULL, *ic2 = NULL;
    Eina_Bool has_desktop = EINA_FALSE;
 
    if (ec->exe_inst)
@@ -151,8 +152,12 @@ _bar_icon_match(Instance *inst, E_Client *ec)
         if (ec->exe_inst->desktop)
           has_desktop = EINA_TRUE;
      }
-   if (has_desktop)   
-     ic = eina_hash_find(inst->icons_desktop_hash, 
ec->exe_inst->desktop->orig_path);
+   if (has_desktop)
+     {
+        ic = eina_hash_find(inst->icons_desktop_hash, 
ec->exe_inst->desktop->orig_path);
+        if ((ic2 = eina_hash_find(inst->icons_clients_hash, ec)))
+          _bar_icon_del(inst, ic2);
+     }
    if (has_desktop && !ic)
      ic = eina_hash_find(inst->icons_clients_hash, ec);
    if (!ic)

-- 


Reply via email to