=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/resize.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- src/usr.bin/tmux/resize.c 2020/01/28 08:06:11 1.37 +++ src/usr.bin/tmux/resize.c 2020/01/28 13:23:24 1.38 @@ -1,4 +1,4 @@ -/* $OpenBSD: resize.c,v 1.37 2020/01/28 08:06:11 nicm Exp $ */ +/* $OpenBSD: resize.c,v 1.38 2020/01/28 13:23:24 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -66,10 +66,26 @@ static int ignore_client_size(struct client *c) { + struct client *loop; + if (c->session == NULL) return (1); if (c->flags & CLIENT_NOSIZEFLAGS) return (1); + if (c->flags & CLIENT_READONLY) { + /* + * Ignore readonly clients if there are any attached clients + * that aren't readonly. + */ + TAILQ_FOREACH (loop, &clients, entry) { + if (loop->session == NULL) + continue; + if (loop->flags & CLIENT_NOSIZEFLAGS) + continue; + if (~loop->flags & CLIENT_READONLY) + return (1); + } + } if ((c->flags & CLIENT_CONTROL) && (~c->flags & CLIENT_SIZECHANGED)) return (1); return (0);