diff options
author | Thomas Adam <thomas@xteddy.org> | 2020-01-28 14:01:25 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2020-01-28 14:01:25 +0000 |
commit | 7eada28f965d8e3b01df6e070e3b1ce5cb1784bf (patch) | |
tree | 03e46e4a2c6b4be5af4c11d8e25beacc2b6682ba /resize.c | |
parent | 60ab7144517483d4343e7a68625e376c34557b8a (diff) | |
parent | b905c5d455b354f7210dc118f748a658f0358cd7 (diff) | |
download | rtmux-7eada28f965d8e3b01df6e070e3b1ce5cb1784bf.tar.gz rtmux-7eada28f965d8e3b01df6e070e3b1ce5cb1784bf.tar.bz2 rtmux-7eada28f965d8e3b01df6e070e3b1ce5cb1784bf.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'resize.c')
-rw-r--r-- | resize.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -66,10 +66,26 @@ resize_window(struct window *w, u_int sx, u_int sy, int xpixel, int ypixel) 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); |