Bugfix: Correctly restart i3 when not using its absolute path

next
Michael Stapelberg 2009-05-01 16:10:02 +02:00
parent e9c5643a8b
commit e91f399609
4 changed files with 6 additions and 5 deletions

1
debian/changelog vendored
View File

@ -24,6 +24,7 @@ i3-wm (3.a-bf1-1) unstable; urgency=low
etc.
* Bugfix: Correctly update state when moving fullscreen windows across
workspaces.
* Bugfix: Correctly restart i3 when not using its absolute path
* Implement scrolling on stack windows and on the bottom bar.
* Create i3-wm-dbg with debug symbols
* Don't rely on libxcb-wm any longer, as it got removed in libxcb 0.3.4.

View File

@ -22,7 +22,7 @@
#define NUM_ATOMS 12
extern char *application_path;
extern char **start_argv;
extern Display *xkbdpy;
extern TAILQ_HEAD(bindings_head, Binding) bindings;
extern SLIST_HEAD(stack_wins_head, Stack_Window) stack_wins;

View File

@ -607,8 +607,8 @@ void parse_command(xcb_connection_t *conn, const char *command) {
/* Is it <restart>? Then restart in place. */
if (STARTS_WITH(command, "restart")) {
LOG("restarting \"%s\"...\n", application_path);
execl(application_path, application_path, NULL);
LOG("restarting \"%s\"...\n", start_argv[0]);
execvp(start_argv[0], start_argv);
/* not reached */
}

View File

@ -44,7 +44,7 @@
#include "xinerama.h"
/* This is the path to i3, copied from argv[0] when starting up */
char *application_path;
char **start_argv;
/* This is our connection to X11 for use with XKB */
Display *xkbdpy;
@ -338,7 +338,7 @@ int main(int argc, char *argv[], char *env[]) {
if (!isatty(fileno(stdout)))
setbuf(stdout, NULL);
application_path = sstrdup(argv[0]);
start_argv = argv;
while ((opt = getopt(argc, argv, "c:v")) != -1) {
switch (opt) {