mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
If ALL clients are readonly, allow them to affect the size, suggested by Thomas Sattler.
This commit is contained in:
parent
e388702260
commit
b905c5d455
16
resize.c
16
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);
|
||||
|
Loading…
Reference in New Issue
Block a user