summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/window.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-10-10 15:29:34 +0000
committernicm <nicm@openbsd.org>2009-10-10 15:29:34 +0000
commitadf30e616d603c4e8b83231f22cc1f260e62b7dc (patch)
treec60be041401a5efe7f8e28faa65733ca08c4fbe0 /usr.bin/tmux/window.c
parentWhen a window is zombified and automatic-rename is on, append [dead] to the (diff)
downloadwireguard-openbsd-adf30e616d603c4e8b83231f22cc1f260e62b7dc.tar.xz
wireguard-openbsd-adf30e616d603c4e8b83231f22cc1f260e62b7dc.zip
Accept key and mouse input for keys in zombified windows if they are in a mode..
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r--usr.bin/tmux/window.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index 6aa4dccb9f3..cb0f1cc1a88 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.29 2009/10/10 14:51:16 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.30 2009/10/10 15:29:34 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -629,15 +629,17 @@ window_pane_key(struct window_pane *wp, struct client *c, int key)
{
struct window_pane *wp2;
- if (wp->fd == -1 || !window_pane_visible(wp))
+ if (!window_pane_visible(wp))
return;
if (wp->mode != NULL) {
if (wp->mode->key != NULL)
wp->mode->key(wp, c, key);
return;
- }
+ }
+ if (wp->fd == -1)
+ return;
input_key(wp, key);
if (options_get_number(&wp->window->options, "synchronize-panes")) {
TAILQ_FOREACH(wp2, &wp->window->panes, entry) {
@@ -653,7 +655,7 @@ void
window_pane_mouse(
struct window_pane *wp, struct client *c, u_char b, u_char x, u_char y)
{
- if (wp->fd == -1 || !window_pane_visible(wp))
+ if (!window_pane_visible(wp))
return;
/* XXX convert from 1-based? */
@@ -668,7 +670,7 @@ window_pane_mouse(
if (wp->mode != NULL) {
if (wp->mode->mouse != NULL)
wp->mode->mouse(wp, c, b, x, y);
- } else
+ } else if (wp->fd != -1)
input_mouse(wp, b, x, y);
}