diff options
author | Thomas Adam <thomas@xteddy.org> | 2016-11-16 02:01:11 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2016-11-16 02:01:11 +0000 |
commit | 12c49fa3bd3add65039fe8850b9490b366ccdc43 (patch) | |
tree | 294c6b8ade2bf967aebcc93a4981c1ca3e570bef /window.c | |
parent | 1afe9e98de5455f75b2753b26069c8d55bd22c81 (diff) | |
parent | e88b74350fba9e35307f35a8645b23e3cde9200a (diff) | |
download | rtmux-12c49fa3bd3add65039fe8850b9490b366ccdc43.tar.gz rtmux-12c49fa3bd3add65039fe8850b9490b366ccdc43.tar.bz2 rtmux-12c49fa3bd3add65039fe8850b9490b366ccdc43.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1200,17 +1200,23 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s, } int -window_pane_visible(struct window_pane *wp) +window_pane_outside(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 (0); + return (1); 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 (1); + return (!window_pane_outside(wp)); } char * |