diff options
-rw-r--r-- | usr.bin/tmux/client.c | 7 | ||||
-rw-r--r-- | usr.bin/tmux/screen-redraw.c | 8 | ||||
-rw-r--r-- | usr.bin/tmux/server-client.c | 23 | ||||
-rw-r--r-- | usr.bin/tmux/server.c | 8 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 6 |
5 files changed, 29 insertions, 23 deletions
diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index dfbf36939be..be281848fdc 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.162 2024/05/15 09:59:12 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.163 2024/08/26 07:30:46 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -445,11 +445,12 @@ client_send_identify(const char *ttynam, const char *termname, char **caps, { char **ss; size_t sslen; - int fd, flags = client_flags; + int fd; + uint64_t flags = client_flags; pid_t pid; u_int i; - proc_send(client_peer, MSG_IDENTIFY_FLAGS, -1, &flags, sizeof flags); + proc_send(client_peer, MSG_IDENTIFY_LONGFLAGS, -1, &flags, sizeof flags); proc_send(client_peer, MSG_IDENTIFY_LONGFLAGS, -1, &client_flags, sizeof client_flags); diff --git a/usr.bin/tmux/screen-redraw.c b/usr.bin/tmux/screen-redraw.c index dd87e0eb50a..b18ac4b11f2 100644 --- a/usr.bin/tmux/screen-redraw.c +++ b/usr.bin/tmux/screen-redraw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-redraw.c,v 1.96 2022/06/30 09:55:53 nicm Exp $ */ +/* $OpenBSD: screen-redraw.c,v 1.97 2024/08/26 07:30:46 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -496,8 +496,8 @@ screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx) } /* Update status line and change flags if unchanged. */ -static int -screen_redraw_update(struct client *c, int flags) +static uint64_t +screen_redraw_update(struct client *c, uint64_t flags) { struct window *w = c->session->curw->window; struct window_pane *wp; @@ -567,7 +567,7 @@ void screen_redraw_screen(struct client *c) { struct screen_redraw_ctx ctx; - int flags; + uint64_t flags; if (c->flags & CLIENT_SUSPENDED) return; diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 6ed62c49bec..3dace5bb82b 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.405 2024/04/10 07:29:15 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.406 2024/08/26 07:30:46 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1870,7 +1870,8 @@ server_client_key_callback(struct cmdq_item *item, void *data) struct timeval tv; struct key_table *table, *first; struct key_binding *bd; - int xtimeout, flags; + int xtimeout; + uint64_t flags; struct cmd_find_state fs; key_code key0, prefix, prefix2; @@ -2569,7 +2570,8 @@ server_client_check_redraw(struct client *c) struct tty *tty = &c->tty; struct window *w = c->session->curw->window; struct window_pane *wp; - int needed, flags, mode = tty->mode, new_flags = 0; + int needed, tty_flags, mode = tty->mode; + uint64_t client_flags = 0; int redraw; u_int bit = 0; struct timeval tv = { .tv_usec = 1000 }; @@ -2603,7 +2605,7 @@ server_client_check_redraw(struct client *c) } } if (needed) - new_flags |= CLIENT_REDRAWPANES; + client_flags |= CLIENT_REDRAWPANES; } if (needed && (left = EVBUFFER_LENGTH(tty->out)) != 0) { log_debug("%s: redraw deferred (%zu left)", c->name, left); @@ -2626,20 +2628,20 @@ server_client_check_redraw(struct client *c) * If more that 64 panes, give up and * just redraw the window. */ - new_flags &= CLIENT_REDRAWPANES; - new_flags |= CLIENT_REDRAWWINDOW; + client_flags &= CLIENT_REDRAWPANES; + client_flags |= CLIENT_REDRAWWINDOW; break; } } if (c->redraw_panes != 0) c->flags |= CLIENT_REDRAWPANES; } - c->flags |= new_flags; + c->flags |= client_flags; return; } else if (needed) log_debug("%s: redraw needed", c->name); - flags = tty->flags & (TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR); + tty_flags = tty->flags & (TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR); tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE))|TTY_NOCURSOR; if (~c->flags & CLIENT_REDRAWWINDOW) { @@ -2671,9 +2673,10 @@ server_client_check_redraw(struct client *c) screen_redraw_screen(c); } - tty->flags = (tty->flags & ~TTY_NOCURSOR)|(flags & TTY_NOCURSOR); + tty->flags = (tty->flags & ~TTY_NOCURSOR)|(tty_flags & TTY_NOCURSOR); tty_update_mode(tty, mode, NULL); - tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR))|flags; + tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR))| + tty_flags; c->flags &= ~(CLIENT_ALLREDRAWFLAGS|CLIENT_STATUSFORCE); diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index c5cfce6e0f4..d01d15dabe7 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.206 2024/05/14 10:11:09 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.207 2024/08/26 07:30:46 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -104,8 +104,8 @@ server_check_marked(void) } /* Create server socket. */ -static int -server_create_socket(int flags, char **cause) +int +server_create_socket(uint64_t flags, char **cause) { struct sockaddr_un sa; size_t size; @@ -170,7 +170,7 @@ server_tidy_event(__unused int fd, __unused short events, __unused void *data) /* Fork new server. */ int -server_start(struct tmuxproc *client, int flags, struct event_base *base, +server_start(struct tmuxproc *client, uint64_t flags, struct event_base *base, int lockfd, char *lockfile) { int fd; diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 27ec44ff6a2..f8e7c5275db 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.1224 2024/08/26 07:14:40 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.1225 2024/08/26 07:30:46 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -2703,10 +2703,12 @@ void server_clear_marked(void); int server_is_marked(struct session *, struct winlink *, struct window_pane *); int server_check_marked(void); -int server_start(struct tmuxproc *, int, struct event_base *, int, char *); +int server_start(struct tmuxproc *, uint64_t, struct event_base *, int, + char *); void server_update_socket(void); void server_add_accept(int); void printflike(1, 2) server_add_message(const char *, ...); +int server_create_socket(uint64_t, char **); /* server-client.c */ RB_PROTOTYPE(client_windows, client_window, entry, server_client_window_cmp); |