forked from enlightenment/efl
ecore_wl2: connect to default display
Summary: if there is no env var AND no name, connection to wayland-0 Reviewers: raster, jpeg, devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3945
This commit is contained in:
parent
b92029f422
commit
ca55a920d9
|
@ -636,6 +636,10 @@ ecore_wl2_display_connect(const char *name)
|
||||||
{
|
{
|
||||||
/* client wants to connect to default display */
|
/* client wants to connect to default display */
|
||||||
n = getenv("WAYLAND_DISPLAY");
|
n = getenv("WAYLAND_DISPLAY");
|
||||||
|
|
||||||
|
if (!n)
|
||||||
|
n = "wayland-0";
|
||||||
|
|
||||||
if (n)
|
if (n)
|
||||||
{
|
{
|
||||||
/* we have a default wayland display */
|
/* we have a default wayland display */
|
||||||
|
@ -654,12 +658,6 @@ 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;
|
||||||
|
|
Loading…
Reference in New Issue