forked from enlightenment/efl
ecore-wl2: Connect to proper name during ecore_wl2_display_connect
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
ea371c88fc
commit
5a13b093b5
|
@ -425,6 +425,12 @@ ecore_wl2_display_connect(const char *name)
|
||||||
if (ewd) goto found;
|
if (ewd) goto found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((!name) && (!n))
|
||||||
|
{
|
||||||
|
ERR("No Wayland Display Running");
|
||||||
|
goto name_err;
|
||||||
|
}
|
||||||
|
|
||||||
/* allocate space for display structure */
|
/* allocate space for display structure */
|
||||||
ewd = calloc(1, sizeof(Ecore_Wl2_Display));
|
ewd = calloc(1, sizeof(Ecore_Wl2_Display));
|
||||||
if (!ewd) return NULL;
|
if (!ewd) return NULL;
|
||||||
|
@ -439,10 +445,10 @@ ecore_wl2_display_connect(const char *name)
|
||||||
ewd->globals = eina_hash_int32_new(_cb_globals_hash_del);
|
ewd->globals = eina_hash_int32_new(_cb_globals_hash_del);
|
||||||
|
|
||||||
/* try to connect to wayland display with this name */
|
/* try to connect to wayland display with this name */
|
||||||
ewd->wl.display = wl_display_connect(name);
|
ewd->wl.display = wl_display_connect(ewd->name);
|
||||||
if (!ewd->wl.display)
|
if (!ewd->wl.display)
|
||||||
{
|
{
|
||||||
ERR("Could not connect to display %s: %m", name);
|
ERR("Could not connect to display %s: %m", ewd->name);
|
||||||
goto connect_err;
|
goto connect_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,6 +490,10 @@ connect_err:
|
||||||
free(ewd);
|
free(ewd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
name_err:
|
||||||
|
eina_hash_free(_client_displays);
|
||||||
|
return NULL;
|
||||||
|
|
||||||
found:
|
found:
|
||||||
ewd->refs++;
|
ewd->refs++;
|
||||||
return ewd;
|
return ewd;
|
||||||
|
|
Loading…
Reference in New Issue