Don't accept input to a window if it not visible.

This commit is contained in:
Nicholas Marriott 2009-07-15 17:43:21 +00:00
parent 82b45b460e
commit ad1945c278
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $Id: window.c,v 1.91 2009-07-15 17:42:44 nicm Exp $ */
/* $Id: window.c,v 1.92 2009-07-15 17:43:21 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -578,7 +578,7 @@ window_pane_parse(struct window_pane *wp)
void
window_pane_key(struct window_pane *wp, struct client *c, int key)
{
if (wp->fd == -1)
if (wp->fd == -1 || !window_pane_visible(wp))
return;
if (wp->mode != NULL) {
@ -592,7 +592,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)
if (wp->fd == -1 || !window_pane_visible(wp))
return;
/* XXX convert from 1-based? */