summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/resize.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-05-16 15:45:29 +0000
committernicm <nicm@openbsd.org>2020-05-16 15:45:29 +0000
commitcfef6bbb1d77001fc12a65f3a9ab78b561181129 (patch)
tree4583d192ce805d7044b0c86d0e5020048837ef48 /usr.bin/tmux/resize.c
parentOnly redraw popup on the client it belongs to. (diff)
downloadwireguard-openbsd-cfef6bbb1d77001fc12a65f3a9ab78b561181129.tar.xz
wireguard-openbsd-cfef6bbb1d77001fc12a65f3a9ab78b561181129.zip
Change the existing client flags for control mode to apply for any
client, use the same mechanism for the read-only flag and add an ignore-size flag. refresh-client -F has become -f (-F stays for backwards compatibility) and attach-session and switch-client now have -f flags also. A new format "client_flags" lists the flags and is shown by list-clients by default. This separates the read-only flag from "ignore size" behaviour (new ignore-size) flag - both behaviours are useful in different circumstances. attach -r and switchc -r remain and set or toggle both flags together.
Diffstat (limited to 'usr.bin/tmux/resize.c')
-rw-r--r--usr.bin/tmux/resize.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/resize.c b/usr.bin/tmux/resize.c
index 0a226756e3a..560d47effcc 100644
--- a/usr.bin/tmux/resize.c
+++ b/usr.bin/tmux/resize.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resize.c,v 1.38 2020/01/28 13:23:24 nicm Exp $ */
+/* $OpenBSD: resize.c,v 1.39 2020/05/16 15:45:29 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -72,17 +72,17 @@ ignore_client_size(struct client *c)
return (1);
if (c->flags & CLIENT_NOSIZEFLAGS)
return (1);
- if (c->flags & CLIENT_READONLY) {
+ if (c->flags & CLIENT_IGNORESIZE) {
/*
- * Ignore readonly clients if there are any attached clients
- * that aren't readonly.
+ * Ignore flagged clients if there are any attached clients
+ * that aren't flagged.
*/
TAILQ_FOREACH (loop, &clients, entry) {
if (loop->session == NULL)
continue;
if (loop->flags & CLIENT_NOSIZEFLAGS)
continue;
- if (~loop->flags & CLIENT_READONLY)
+ if (~loop->flags & CLIENT_IGNORESIZE)
return (1);
}
}