aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-08-28 14:01:17 +0100
committerThomas Adam <thomas@xteddy.org>2017-08-28 14:01:17 +0100
commit7d3bf6453ec43f03ff98231c5ced5a2979550f84 (patch)
tree84c63317aa4db9c3084a2279f20959fcfaf954e7 /window.c
parentb2322b38937f6e4232154c3fce25d539e4b054df (diff)
parentfe4467ad2bf7b37a12330ed0a147e7230d60179a (diff)
downloadrtmux-7d3bf6453ec43f03ff98231c5ced5a2979550f84.tar.gz
rtmux-7d3bf6453ec43f03ff98231c5ced5a2979550f84.tar.bz2
rtmux-7d3bf6453ec43f03ff98231c5ced5a2979550f84.zip
Merge branch 'obsd-master'
Diffstat (limited to 'window.c')
-rw-r--r--window.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/window.c b/window.c
index 505be96d..7e3a8e53 100644
--- a/window.c
+++ b/window.c
@@ -632,6 +632,8 @@ window_add_pane(struct window *w, struct window_pane *other, int before,
void
window_lost_pane(struct window *w, struct window_pane *wp)
{
+ log_debug("%s: @%u pane %%%u", __func__, w->id, wp->id);
+
if (wp == marked_pane.wp)
server_clear_marked();
@@ -1292,23 +1294,18 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s,
}
int
-window_pane_outside(struct window_pane *wp)
+window_pane_visible(struct window_pane *wp)
{
struct window *w = wp->window;
+ if (wp->layout_cell == NULL)
+ return (0);
+
if (wp->xoff >= w->sx || wp->yoff >= w->sy)
- return (1);
+ return (0);
if (wp->xoff + wp->sx > w->sx || wp->yoff + wp->sy > w->sy)
- return (1);
- return (0);
-}
-
-int
-window_pane_visible(struct window_pane *wp)
-{
- if (wp->layout_cell == NULL)
return (0);
- return (!window_pane_outside(wp));
+ return (1);
}
u_int