From c304e576d000cf0c3f7c788c14f28ba53ba15dcd Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Thu, 11 Apr 2013 03:19:43 +0000 Subject: [PATCH] e-modules/engage: only start scale windows when there is more than one of same class SVN revision: 84504 --- src/ng_taskbar.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ng_taskbar.c b/src/ng_taskbar.c index ee3e040..10abf03 100644 --- a/src/ng_taskbar.c +++ b/src/ng_taskbar.c @@ -761,10 +761,20 @@ _item_cb_mouse_up(Ngi_Item *item, Ecore_Event_Mouse_Button *ev) { char buf[1024]; E_Action *act = e_action_find("scale-windows"); + Eina_List *l; + Ngi_Item_Taskbar *l_it; + int cnt = 0; if (!act) return; - if (!bd->client.icccm.class) return; - + if (!it->class) return; + + EINA_LIST_FOREACH(it->base.box->items, l, l_it) + if (l_it->class == it->class) + cnt++; + + if (cnt < 2) + return; + snprintf(buf, 1024, "go_scale_class:%s", bd->client.icccm.class); act->func.go(NULL, buf); }