summaryrefslogtreecommitdiff
path: root/src/actions.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2005-01-15 17:03:34 +0000
committersabetts <sabetts>2005-01-15 17:03:34 +0000
commit47c3a7c2bed43e9c73c87be8283af1bd4f216e82 (patch)
tree8dffd1bccaae1a2d0c68bffdd1bc5f26738dc5e1 /src/actions.c
parentd6d45c517d608b15e08b1669f1d82b3db558d697 (diff)
downloadratpoison-47c3a7c2bed43e9c73c87be8283af1bd4f216e82.zip
* src/globals.h (rp_exec_newwm): new extern.
* src/globals.c (rp_exec_newwm): new global. * src/actions.c (cmd_newwm): set rp_exec_newwm to the new wm. * src/events.c (listen_for_events): call XSync after delegate_event. (handle_signals): exec newwm if its not NULL. Report X11 errors (moved from listen_for_events).
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/actions.c b/src/actions.c
index 8d301c6..0e80fbb 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -2408,13 +2408,8 @@ spawn(char *cmd)
cmdret *
cmd_newwm(int interactive, struct cmdarg **args)
{
- PRINT_DEBUG (("Switching to %s\n", ARG_STRING(0)));
-
- putenv(current_screen()->display_string);
- execlp(ARG_STRING(0), ARG_STRING(0), 0);
-
- PRINT_ERROR (("exec %s ", ARG_STRING(0)));
- perror(" failed");
+ /* in the event loop, this will switch WMs. */
+ rp_exec_newwm = xstrdup (ARG_STRING(0));
return cmdret_new (NULL, RET_SUCCESS);
}