summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/genrpbindings2
-rw-r--r--doc/ratpoison.texi2
-rw-r--r--src/events.c6
3 files changed, 8 insertions, 2 deletions
diff --git a/contrib/genrpbindings b/contrib/genrpbindings
index dffa99c..51a6148 100755
--- a/contrib/genrpbindings
+++ b/contrib/genrpbindings
@@ -60,7 +60,7 @@ open PYTHON, ">$PYTHON_FILE" or die "Can't create $PYTHON_FILE";
# PERL preamble
print PERL 'package Ratpoison;';
print PERL '$RATPOISON="',$RATPOISON,'";';
-print PERL 'sub command { return `$RATPOISON -c "@_"`; }';
+print PERL 'sub command { my $a = "@_"; $a =~ s/(\')/\'\\\\\'\'/g; return `$RATPOISON -c \'$a\'`; }';
# ELISP preamble
print ELISP '(defvar ratpoison-program "',$RATPOISON,'")';
diff --git a/doc/ratpoison.texi b/doc/ratpoison.texi
index 9b8ec84..3a42419 100644
--- a/doc/ratpoison.texi
+++ b/doc/ratpoison.texi
@@ -74,7 +74,7 @@ details.
@node Top, GNU Free Documentation License, (dir), (dir)
@ifinfo
-This document explains how to use ratpoison 1.4.1.
+This document explains how to use ratpoison 1.4.3.
@end ifinfo
@menu
diff --git a/src/events.c b/src/events.c
index ec26ceb..e52acf4 100644
--- a/src/events.c
+++ b/src/events.c
@@ -139,6 +139,9 @@ unmap_notify (XEvent *ev)
if (frame->number == win->scr->current_frame
&& current_screen() == win->scr)
set_active_frame (frame, 0);
+ /* Since we may have switched windows, call the hook. */
+ if (frame->win_number != EMPTY)
+ hook_run (&rp_switch_win_hook);
}
withdraw_window (win);
@@ -234,6 +237,9 @@ destroy_window (XDestroyWindowEvent *ev)
&& current_screen() == win->scr)
set_active_frame (frame, 0);
}
+ /* Since we may have switched windows, call the hook. */
+ if (frame->win_number != EMPTY)
+ hook_run (&rp_switch_win_hook);
withdraw_window (win);
}