discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e99183c33b734a7914e9934cbbe972fd094f226c

commit e99183c33b734a7914e9934cbbe972fd094f226c
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Nov 8 11:48:39 2017 -0500

    quicklaunch: add support for quicklaunch domains
    
    this allows quicklaunch to be used independently of the DISPLAY value
---
 src/bin/elementary/quicklaunch.c | 11 ++++++++---
 src/bin/elementary/run.c         | 11 ++++++++---
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/bin/elementary/quicklaunch.c b/src/bin/elementary/quicklaunch.c
index b7fec56740..6370f6d683 100644
--- a/src/bin/elementary/quicklaunch.c
+++ b/src/bin/elementary/quicklaunch.c
@@ -181,7 +181,7 @@ main(int argc, char **argv)
    struct linger lin;
    char buf[PATH_MAX];
    struct sigaction action;
-   const char *disp;
+   const char *domain;
    int ret = 0;
 
    if (!eina_init())
@@ -197,7 +197,12 @@ main(int argc, char **argv)
         _log_dom = EINA_LOG_DOMAIN_GLOBAL;
      }
 
-   if (!(disp = getenv("DISPLAY"))) disp = "unknown";
+   if (!(domain = getenv("ELM_QUICKLAUNCH_DOMAIN")))
+     {
+        domain = getenv("WAYLAND_DISPLAY");
+        if (!domain) domain = getenv("DISPLAY");
+        if (!domain) domain = "unknown";
+     }
    snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i", getuid());
    if (stat(buf, &st) < 0)
      {
@@ -208,7 +213,7 @@ main(int argc, char **argv)
              exit(-1);
           }
      }
-   snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i/%s", getuid(), disp);
+   snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i/%s", getuid(), domain);
    unlink(buf);
    sock = socket(AF_UNIX, SOCK_STREAM, 0);
    if (sock < 0)
diff --git a/src/bin/elementary/run.c b/src/bin/elementary/run.c
index a3ad3a4cab..6d547ad16a 100644
--- a/src/bin/elementary/run.c
+++ b/src/bin/elementary/run.c
@@ -32,7 +32,7 @@ main(int argc, char **argv)
    struct stat st;
    char *exe;
    int we_are_elementary_run = 0;
-   char *disp;
+   char *domain;
    char *cwd;
 
    int sargc, slen, envnum;
@@ -45,8 +45,13 @@ main(int argc, char **argv)
         exit(-1);
      }
    cwd = strdup(buf);
-   if (!(disp = getenv("DISPLAY"))) disp = "unknown";
-   snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i/%s", getuid(), disp);
+   if (!(domain = getenv("ELM_QUICKLAUNCH_DOMAIN")))
+     {
+        domain = getenv("WAYLAND_DISPLAY");
+        if (!domain) domain = getenv("DISPLAY");
+        if (!domain) domain = "unknown";
+     }
+   snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i/%s", getuid(), domain);
    if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
      {
         perror("elementary_quicklaunch: socket(AF_UNIX, SOCK_STREAM, 0)");

-- 


Reply via email to