goto: fix the go to window closing issue.

When go to window is unfocused, window is closed.
Though this behavior was intended, the functionality was not quite nice.
Even this caused a weired behavior(bug) on windows that,
go to window was closed when it's minimized.

So get rid of this policy!

@fix T3922
This commit is contained in:
Hermet Park 2016-07-21 17:13:21 +09:00
parent 8aeac17e4d
commit 7d88c580e1
1 changed files with 0 additions and 23 deletions

View File

@ -4,15 +4,12 @@
#include "common.h"
#define UNFOCUS_DELAY 0.2
typedef struct goto_s
{
Evas_Object *win;
Evas_Object *layout;
Evas_Object *entry;
Evas_Object *btn;
Ecore_Timer *timer;
Enventor_Item *it;
} goto_data;
@ -33,23 +30,6 @@ win_delete_request_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
goto_close();
}
static Eina_Bool
timer_cb(void *data EINA_UNUSED)
{
goto_close();
return ECORE_CALLBACK_CANCEL;
}
static void
win_unfocused_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
goto_data *gd = (goto_data*) data;
if (gd->timer) return;
evas_object_hide(gd->win);
gd->timer = ecore_timer_add(UNFOCUS_DELAY, timer_cb, gd);
}
static void
win_moved_cb(void *data EINA_UNUSED, Evas_Object *obj,
void *event_info EINA_UNUSED)
@ -158,7 +138,6 @@ goto_open(void)
win_w = (Evas_Coord) ((double) win_w * elm_config_scale_get());
win_h = (Evas_Coord) ((double) win_h * elm_config_scale_get());
evas_object_resize(win, win_w, win_h);
evas_object_smart_callback_add(win, "unfocused", win_unfocused_cb, gd);
evas_object_smart_callback_add(win, "delete,request", win_delete_request_cb,
gd);
evas_object_smart_callback_add(win, "moved", win_moved_cb, gd);
@ -240,8 +219,6 @@ goto_close(void)
evas_object_geometry_get(gd->win, NULL, NULL, &win_w, &win_h);
elm_win_screen_position_get(gd->win, &win_x, &win_y);
evas_object_del(gd->win);
if (gd->timer)
ecore_timer_del(gd->timer);
free(gd);
g_gd = NULL;