From 763c1d3c647084c10595ce07c3aeb1eb4480718f Mon Sep 17 00:00:00 2001 From: Rajeev Ranjan Date: Sat, 15 Oct 2011 14:04:29 +0530 Subject: [PATCH] Fixed Prevent issues: 55301, 56401, 56400, 56431 Change-Id: I1994004fabe843d9918b2177212a0b1f536e1937 --- src/bin/test_panel.c | 12 ++++++++++-- src/lib/elm_glview.c | 4 ++-- src/lib/elm_win.c | 7 +++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/bin/test_panel.c b/src/bin/test_panel.c index 3092fc9..dd42ff3 100644 --- a/src/bin/test_panel.c +++ b/src/bin/test_panel.c @@ -89,14 +89,22 @@ _fill_list(Evas_Object *obj) struct dirent *de; Eina_List *dirs = NULL, *l; char *real; + const char *home; - if (!(d = opendir(getenv("HOME")))) return; +#ifdef _WIN32 + home = evil_homedir_get(); +#else + home = getenv("HOME"); +#endif + if (!home) + home = "./"; + if (!(d = opendir(home))) return; while ((de = readdir(d))) { char buff[PATH_MAX]; if (de->d_name[0] == '.') continue; - snprintf(buff, sizeof(buff), "%s/%s", getenv("HOME"), de->d_name); + snprintf(buff, sizeof(buff), "%s/%s", home, de->d_name); if (!ecore_file_is_dir(buff)) continue; real = ecore_file_realpath(buff); dirs = eina_list_append(dirs, real); diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c index d1311e7..8e6e241 100644 --- a/src/lib/elm_glview.c +++ b/src/lib/elm_glview.c @@ -337,13 +337,13 @@ elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy) case ELM_GLVIEW_RESIZE_POLICY_RECREATE: case ELM_GLVIEW_RESIZE_POLICY_SCALE: wd->scale_policy = policy; + _glview_update_surface(obj); + elm_glview_changed_set(obj); return EINA_TRUE; default: ERR("Invalid Scale Policy.\n"); return EINA_FALSE; } - _glview_update_surface(obj); - elm_glview_changed_set(obj); } EAPI Eina_Bool diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 7f97552..7e6f957 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -147,6 +147,7 @@ _shot_file_get(Elm_Win *win) sprintf(repname + (dotptr - tmp), "%03i", win->shot.shot_counter + 1); strcat(repname, dotptr); + free(tmp); return repname; } } @@ -2642,7 +2643,6 @@ _elm_ee_win_get(const Evas_Object *obj) EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj) { - Ecore_X_Window xwin = 0; Elm_Win *win; const char *type; @@ -2652,10 +2652,9 @@ elm_win_xwindow_get(const Evas_Object *obj) if (type != widtype) return _elm_ee_win_get(obj); #ifdef HAVE_ELEMENTARY_X win = elm_widget_data_get(obj); - if (!win) return xwin; + if (!win) return 0; if (win->xwin) return win->xwin; if (win->parent) return elm_win_xwindow_get(win->parent); #endif - return xwin; - win = NULL; + return 0; } -- 2.7.4