summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorBernhard R. Link <brlink@debian.org>2009-01-03 16:21:34 +0100
committerShawn <sabetts@juicebox.(none)>2009-01-16 15:57:40 -0800
commitffae4bf9413bec7efd5d4821e030b63a700fab69 (patch)
treea571f33a5043d162db60c4d190bb9949a20105c7 /src/events.c
parent9888fccffbc7d9f5680512b03ace6dd5fc325094 (diff)
downloadratpoison-ffae4bf9413bec7efd5d4821e030b63a700fab69.zip
Move screen activation code to new (de)activate_screen functions,
making sure _NET atoms are reset after tmpwm and deleted when exiting.
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/events.c b/src/events.c
index 0e122a2..d973639 100644
--- a/src/events.c
+++ b/src/events.c
@@ -931,11 +931,17 @@ handle_signals (void)
if (rp_exec_newwm)
{
+ int i;
+
PRINT_DEBUG (("Switching to %s\n", rp_exec_newwm));
putenv(current_screen()->display_string);
unhide_all_windows();
XSync(dpy, False);
+ for (i=0; i<num_screens; i++)
+ {
+ deactivate_screen(&screens[i]);
+ }
execlp(rp_exec_newwm, rp_exec_newwm, NULL);
/* Failed. Clean up. */
@@ -943,6 +949,10 @@ handle_signals (void)
perror(" failed");
free (rp_exec_newwm);
rp_exec_newwm = NULL;
+ for (i=0; i<num_screens; i++)
+ {
+ activate_screen(&screens[i]);
+ }
}
if (hup_signalled > 0)