aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-06-25 16:00:25 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-06-25 16:00:25 +0000
commit7eff7f762927d5ca3618ca5c47741d86209c4c46 (patch)
tree5e8be1c318327efd43a82425232f52e15a89790c /window.c
parentcd5a4f4c3586eac9c1a4ba7c962cec16fc92dd08 (diff)
downloadrtmux-7eff7f762927d5ca3618ca5c47741d86209c4c46.tar.gz
rtmux-7eff7f762927d5ca3618ca5c47741d86209c4c46.tar.bz2
rtmux-7eff7f762927d5ca3618ca5c47741d86209c4c46.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).
Diffstat (limited to 'window.c')
-rw-r--r--window.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/window.c b/window.c
index d73d5c4e..c1bab68b 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.2 2009/06/05 07:18:37 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.3 2009/06/23 20:17:30 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -568,6 +568,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);
@@ -579,6 +582,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)