forked from enlightenment/enventor
close ctxpopup when warning popup is shown up.
check whether ctxpopup and close it, if window is moving on to close. @fix T2996
This commit is contained in:
parent
100b674f05
commit
8159192a47
|
@ -228,7 +228,8 @@ base_gui_init(void)
|
|||
if ((w > 0) && (w > 0))
|
||||
evas_object_resize(win, w, h);
|
||||
|
||||
evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, win_resize_cb, NULL);
|
||||
evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, win_resize_cb,
|
||||
NULL);
|
||||
evas_object_smart_callback_add(win, "delete,request", win_delete_request_cb,
|
||||
NULL);
|
||||
/* evas_object_smart_callback_add(win, "focused", win_focused_cb, NULL);*/
|
||||
|
|
|
@ -788,6 +788,14 @@ menu_activated_get(void)
|
|||
return md->active_request;
|
||||
}
|
||||
|
||||
static void
|
||||
enventor_ctxpopup_dismissed_cb(void *data, Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
menu_data *md = data;
|
||||
warning_open(md, exit_yes_btn_cb, exit_save_btn_cb);
|
||||
}
|
||||
|
||||
void
|
||||
menu_exit(void)
|
||||
{
|
||||
|
@ -795,7 +803,18 @@ menu_exit(void)
|
|||
if (enventor_object_modified_get(md->enventor))
|
||||
{
|
||||
search_close();
|
||||
warning_open(md, exit_yes_btn_cb, exit_save_btn_cb);
|
||||
if (enventor_object_ctxpopup_visible_get(md->enventor))
|
||||
{
|
||||
/* bacause the main.c handles the ctxpopup dismissed callback,
|
||||
here we needs to override the function */
|
||||
evas_object_smart_callback_priority_add(md->enventor,
|
||||
"ctxpopup,dismissed", 100,
|
||||
enventor_ctxpopup_dismissed_cb,
|
||||
md);
|
||||
enventor_object_ctxpopup_dismiss(md->enventor);
|
||||
}
|
||||
else
|
||||
warning_open(md, exit_yes_btn_cb, exit_save_btn_cb);
|
||||
}
|
||||
else
|
||||
elm_exit();
|
||||
|
|
Loading…
Reference in New Issue