aboutsummaryrefslogtreecommitdiff
path: root/resize.c
diff options
context:
space:
mode:
Diffstat (limited to 'resize.c')
-rw-r--r--resize.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/resize.c b/resize.c
index b4142a70..96d733f0 100644
--- a/resize.c
+++ b/resize.c
@@ -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);