ecore_x: use portable environment lookup.

This commit is contained in:
Cedric BAIL 2015-05-14 18:41:29 +02:00
parent 241d0d3e18
commit 0d6563df6e
2 changed files with 4 additions and 4 deletions

View File

@ -18,8 +18,8 @@ _ecore_xcb_xdefaults_init(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (getenv("HOME"))
snprintf(buff, sizeof(buff), "%s/.Xdefaults", getenv("HOME"));
if (eina_environment_home_get())
snprintf(buff, sizeof(buff), "%s/.Xdefaults", eina_environment_home_get());
else return;
if ((_ecore_xcb_xdefaults_file = eina_file_open(buff, EINA_FALSE)))
{

View File

@ -837,8 +837,8 @@ ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
const char *home;
struct stat st;
home = getenv("HOME");
if (!home) home = "/tmp";
home = eina_environment_home_get();
if (!home) eina_environment_tmp_get();
snprintf(buf, sizeof(buf), "%s/.ecore-no-vsync", home);
if (getenv("ECORE_NO_VSYNC")) vsync_veto = 1;
else if (stat(buf, &st) == 0) vsync_veto = 1;