mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Sync OpenBSD patchset 376:
Accept key and mouse input for keys in zombified windows if they are in a mode..
This commit is contained in:
		
							
								
								
									
										10
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								window.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: window.c,v 1.112 2009-10-11 23:46:02 tcunha Exp $ */
 | 
			
		||||
/* $Id: window.c,v 1.113 2009-10-12 00:04:56 tcunha Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -636,7 +636,7 @@ 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) {
 | 
			
		||||
@@ -645,6 +645,8 @@ window_pane_key(struct window_pane *wp, struct client *c, int 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) {
 | 
			
		||||
@@ -660,7 +662,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? */
 | 
			
		||||
@@ -675,7 +677,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);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user