diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2010-12-06 21:53:50 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2010-12-06 21:53:50 +0000 |
commit | 36e537bcef59cdf194cacf3584b748d49554b32a (patch) | |
tree | 19734720c2bfe9694fbff2cb7a2e898b3fcf8885 | |
parent | fd51bf61c9ff59fc455d45eb1ca6c07afaae3a0e (diff) | |
download | rtmux-36e537bcef59cdf194cacf3584b748d49554b32a.tar.gz rtmux-36e537bcef59cdf194cacf3584b748d49554b32a.tar.bz2 rtmux-36e537bcef59cdf194cacf3584b748d49554b32a.zip |
PatchSet 786
Date: 2010/11/14 08:58:25
Author: nicm
Branch: HEAD
Tag: (none)
Log:
Don't allow last and active window to become the same - a very bad move
when the active window is closed and freed. Reported by sthen@.
Members:
window.c:1.58->1.59
-rw-r--r-- | window.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.140 2010-10-24 01:34:30 tcunha Exp $ */ +/* $Id: window.c,v 1.141 2010-12-06 21:53:50 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -322,6 +322,8 @@ window_resize(struct window *w, u_int sx, u_int sy) void window_set_active_pane(struct window *w, struct window_pane *wp) { + if (wp == w->active) + return; w->last = w->active; w->active = wp; while (!window_pane_visible(w->active)) { @@ -339,7 +341,7 @@ window_set_active_at(struct window *w, u_int x, u_int y) struct window_pane *wp; TAILQ_FOREACH(wp, &w->panes, entry) { - if (!window_pane_visible(wp)) + if (wp == w->active || !window_pane_visible(wp)) continue; if (x < wp->xoff || x >= wp->xoff + wp->sx) continue; |