aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Houston <stephen@localhost.localdomain>2018-02-14 12:53:47 -0600
committerStephen Houston <stephen@localhost.localdomain>2018-02-14 12:53:47 -0600
commit6d6582e88916a76d479b73a01d65475d26678cbc (patch)
tree7e0c7d85687f94e67bdb981a68db89f6a8d51174
parentstore gadget orientation for runner gadgets (diff)
downloadenlightenment-6d6582e88916a76d479b73a01d65475d26678cbc.tar.gz
Luncher: Add a timeout for mousing out when preview already exists. Update preview on deskswitch.
-rw-r--r--src/modules/luncher/bar.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c
index e75bdabc3..486f7ee36 100644
--- a/src/modules/luncher/bar.c
+++ b/src/modules/luncher/bar.c
@@ -470,7 +470,7 @@ _bar_icon_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *eve
elm_object_tooltip_hide(obj);
E_FREE_FUNC(ic->mouse_in_timer, ecore_timer_del);
E_FREE_FUNC(ic->mouse_out_timer, ecore_timer_del);
- ic->mouse_out_timer = ecore_timer_loop_add(0.25, _bar_icon_preview_hide, ic);
+ ic->mouse_out_timer = ecore_timer_loop_add(.25, _bar_icon_preview_hide, ic);
}
static void
@@ -928,10 +928,11 @@ _bar_icon_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *even
}
E_FREE_FUNC(ic->mouse_out_timer, ecore_timer_del);
E_FREE_FUNC(ic->mouse_in_timer, ecore_timer_del);
+ if (ic->inst->current_preview && (ic->preview == ic->inst->current_preview)) return;
if (eina_list_count(ic->execs) || eina_list_count(ic->clients))
clients = EINA_TRUE;
if (clients && ic->inst->current_preview && !ic->inst->current_preview_menu)
- _bar_icon_preview_show(ic);
+ ic->mouse_in_timer = ecore_timer_loop_add(0.2, _bar_icon_preview_show, ic);
else if (clients && !ic->inst->current_preview)
ic->mouse_in_timer = ecore_timer_loop_add(0.3, _bar_icon_preview_show, ic);
}
@@ -1177,6 +1178,31 @@ _bar_icon_add(Instance *inst, Efreet_Desktop *desktop, E_Client *non_desktop_cli
}
static Eina_Bool
+_bar_cb_desk_switch(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Client *ev EINA_UNUSED)
+{
+ Instance *inst = NULL;
+ Icon *ic = NULL;
+ Eina_List *l = NULL, *ll = NULL;
+
+
+ EINA_LIST_FOREACH(luncher_instances, l, inst)
+ {
+ if (inst->current_preview)
+ {
+ EINA_LIST_FOREACH(inst->icons, ll, ic)
+ {
+ if (inst->current_preview && (inst->current_preview == ic->preview))
+ {
+ _bar_icon_preview_show(ic);
+ return ECORE_CALLBACK_RENEW;
+ }
+ }
+ }
+ }
+ return ECORE_CALLBACK_RENEW;
+}
+
+static Eina_Bool
_bar_cb_client_remove(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Client *ev)
{
Instance *inst = NULL;
@@ -2055,6 +2081,8 @@ bar_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient EINA_UNUSED
_bar_cb_exec_del, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_REMOVE,
_bar_cb_client_remove, NULL);
+ E_LIST_HANDLER_APPEND(handlers, E_EVENT_DESK_SHOW,
+ _bar_cb_desk_switch, NULL);
}
if (inst->cfg->id < 0) return inst->o_main;
luncher_instances = eina_list_append(luncher_instances, inst);