make popup behave sanely
This commit is contained in:
parent
75fe933d4d
commit
26445b9a81
|
@ -1122,14 +1122,24 @@ _cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
Evas_Event_Mouse_Up *ev = event_info;
|
||||
|
||||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
||||
if (!inst->ci->popup_on_hover)
|
||||
if (ev->button == 1)
|
||||
{
|
||||
if (!inst->popup) _forecasts_popup_content_create(inst);
|
||||
e_gadcon_popup_show(inst->popup);
|
||||
return;
|
||||
if (!inst->ci->popup_on_hover)
|
||||
{
|
||||
if (!inst->popup)
|
||||
{
|
||||
_forecasts_popup_content_create(inst);
|
||||
e_gadcon_popup_show(inst->popup);
|
||||
e_gadcon_popup_toggle_pinned(inst->popup);
|
||||
}
|
||||
else
|
||||
{
|
||||
_forecasts_popup_destroy(inst);
|
||||
inst->popup = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ev->button == 1) e_gadcon_popup_toggle_pinned(inst->popup);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1149,6 +1159,7 @@ _cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
|
|||
|
||||
if (!(inst->popup)) return;
|
||||
if (inst->popup->pinned) return;
|
||||
e_gadcon_popup_hide(inst->popup);
|
||||
_forecasts_popup_destroy(inst);
|
||||
inst->popup = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue