summaryrefslogtreecommitdiff
path: root/sway/main.c
diff options
context:
space:
mode:
authorDominique Martinet <[email protected]>2018-07-04 13:50:23 +0900
committerDominique Martinet <[email protected]>2018-07-04 13:52:26 +0900
commitc092f1fe6a742bc79015efe6e485c35f49cbf473 (patch)
tree55272d0cb9f32a18b671b049336841024c10c0fa /sway/main.c
parent8cc26130a66f533a5cbb8e4833a536dd8798f833 (diff)
startup: move setenv WAYLAND_DISPLAY before config execs
We would previously run all config commands without the environment, which would appear to work as our socket name is the default one, but wayland clients would start up in the wrong sway session. (This explains why 'sometimes' my swayidle processes wouldn't die with sway, as they weren't listening to the correct socket)
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/main.c b/sway/main.c
index 124f9fbb..8b0b8612 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -416,6 +416,7 @@ int main(int argc, char **argv) {
security_sanity_check();
config->active = true;
+ setenv("WAYLAND_DISPLAY", server.socket, true);
// Execute commands until there are none left
while (config->cmd_queue->length) {
char *line = config->cmd_queue->items[0];