globalconf: move argv out
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
a6de1608a5
commit
6b426b1da1
13
awesome.c
13
awesome.c
|
@ -49,6 +49,9 @@
|
||||||
|
|
||||||
awesome_t globalconf;
|
awesome_t globalconf;
|
||||||
|
|
||||||
|
/** argv used to run awesome */
|
||||||
|
static char *awesome_argv;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
xcb_window_t id;
|
xcb_window_t id;
|
||||||
|
@ -271,7 +274,7 @@ void
|
||||||
awesome_restart(void)
|
awesome_restart(void)
|
||||||
{
|
{
|
||||||
awesome_atexit();
|
awesome_atexit();
|
||||||
a_exec(globalconf.argv);
|
a_exec(awesome_argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Function to restart awesome on some signals.
|
/** Function to restart awesome on some signals.
|
||||||
|
@ -370,13 +373,13 @@ main(int argc, char **argv)
|
||||||
for(i = 0; i < argc; i++)
|
for(i = 0; i < argc; i++)
|
||||||
cmdlen += a_strlen(argv[i]) + 1;
|
cmdlen += a_strlen(argv[i]) + 1;
|
||||||
|
|
||||||
globalconf.argv = p_new(char, cmdlen);
|
awesome_argv = p_new(char, cmdlen);
|
||||||
a_strcpy(globalconf.argv, cmdlen, argv[0]);
|
a_strcpy(awesome_argv, cmdlen, argv[0]);
|
||||||
|
|
||||||
for(i = 1; i < argc; i++)
|
for(i = 1; i < argc; i++)
|
||||||
{
|
{
|
||||||
a_strcat(globalconf.argv, cmdlen, " ");
|
a_strcat(awesome_argv, cmdlen, " ");
|
||||||
a_strcat(globalconf.argv, cmdlen, argv[i]);
|
a_strcat(awesome_argv, cmdlen, argv[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Text won't be printed correctly otherwise */
|
/* Text won't be printed correctly otherwise */
|
||||||
|
|
|
@ -81,8 +81,6 @@ typedef struct
|
||||||
char *conffile;
|
char *conffile;
|
||||||
/** Stack client history */
|
/** Stack client history */
|
||||||
client_array_t stack;
|
client_array_t stack;
|
||||||
/** Command line passed to awesome */
|
|
||||||
char *argv;
|
|
||||||
/** Lua VM state */
|
/** Lua VM state */
|
||||||
lua_State *L;
|
lua_State *L;
|
||||||
/** Default colors */
|
/** Default colors */
|
||||||
|
|
Loading…
Reference in New Issue