-/* $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>
{
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);
-/* $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>
}
/* 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;
screen_redraw_screen(struct client *c)
{
struct screen_redraw_ctx ctx;
- int flags;
+ uint64_t flags;
if (c->flags & CLIENT_SUSPENDED)
return;
-/* $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>
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;
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 };
}
}
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);
* 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) {
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);
-/* $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>
}
/* 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;
/* 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;
-/* $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>
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);