summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-11-08 11:48:39 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-11-08 11:48:39 -0500
commite99183c33b734a7914e9934cbbe972fd094f226c (patch)
treea83b23db07135aa2f65ec34d4e68501524cd9b6a
parent70ee11af84bf81a16eefdf577ce4e4ecb62dcdef (diff)
quicklaunch: add support for quicklaunch domains
this allows quicklaunch to be used independently of the DISPLAY value
-rw-r--r--src/bin/elementary/quicklaunch.c11
-rw-r--r--src/bin/elementary/run.c11
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)");