From ca55a920d9a5f6a4274e40fcf901a89e622c3007 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 16 May 2016 19:14:40 +0900 Subject: 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 --- src/lib/ecore_wl2/ecore_wl2_display.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index 2b007ca64e..7770d3b4da 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -636,6 +636,10 @@ ecore_wl2_display_connect(const char *name) { /* client wants to connect to default display */ n = getenv("WAYLAND_DISPLAY"); + + if (!n) + n = "wayland-0"; + if (n) { /* we have a default wayland display */ @@ -654,12 +658,6 @@ ecore_wl2_display_connect(const char *name) if (ewd) goto found; } - if ((!name) && (!n)) - { - ERR("No Wayland Display Running"); - goto name_err; - } - /* allocate space for display structure */ ewd = calloc(1, sizeof(Ecore_Wl2_Display)); if (!ewd) return NULL; -- cgit v1.2.1