From: Axel Wagner Date: Tue, 11 Jan 2011 04:25:04 +0000 (+0100) Subject: Save environment-variable AFTER reading the configfile X-Git-Tag: tree-pr2~118 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=92a038dd251efd511787f1d9cbcd73f8470ceea6;p=i3%2Fi3 Save environment-variable AFTER reading the configfile --- diff --git a/src/main.c b/src/main.c index 9cc70b9b..5000d8a4 100644 --- a/src/main.c +++ b/src/main.c @@ -99,8 +99,6 @@ int main(int argc, char *argv[]) { if (!isatty(fileno(stdout))) setbuf(stdout, NULL); - config.ipc_socket_path = getenv("I3SOCK"); - start_argv = argv; while ((opt = getopt_long(argc, argv, "c:CvaL:hld:V", long_options, &option_index)) != -1) { @@ -180,6 +178,10 @@ int main(int argc, char *argv[]) { exit(0); } + if (config.ipc_socket_path == NULL) { + config.ipc_socket_path = getenv("I3SOCK"); + } + xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screens); root = root_screen->root; root_depth = root_screen->root_depth;