aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-06-23 20:17:30 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-06-23 20:17:30 +0000
commit69f3c24647b2e8c2558a5dc1b4abd82f9e75bf91 (patch)
treeb0768068bf540bf61882d111fc80a5fb02777e15
parentc2b0fdae5b8b3bb3c0ac79f890e180672af27bb3 (diff)
downloadrtmux-69f3c24647b2e8c2558a5dc1b4abd82f9e75bf91.tar.gz
rtmux-69f3c24647b2e8c2558a5dc1b4abd82f9e75bf91.tar.bz2
rtmux-69f3c24647b2e8c2558a5dc1b4abd82f9e75bf91.zip
If a pane is "zombified" (remain-on-exit flag), don't continue to queue key and
mouse input for it (otherwise they are processed after respawn).
-rw-r--r--window.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/window.c b/window.c
index aeed4bc9..b3dcd0f1 100644
--- a/window.c
+++ b/window.c
@@ -554,6 +554,9 @@ window_pane_parse(struct window_pane *wp)
void
window_pane_key(struct window_pane *wp, struct client *c, int key)
{
+ if (wp->fd == -1)
+ return;
+
if (wp->mode != NULL) {
if (wp->mode->key != NULL)
wp->mode->key(wp, c, key);
@@ -565,6 +568,9 @@ void
window_pane_mouse(
struct window_pane *wp, struct client *c, u_char b, u_char x, u_char y)
{
+ if (wp->fd == -1)
+ return;
+
/* XXX convert from 1-based? */
if (x < wp->xoff || x >= wp->xoff + wp->sx)