mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Client flags was changed to uint64_t a while ago, fix a few cases where
it is still int (do not matter now but will with some new flags). From Michael Grant.
This commit is contained in:
parent
a84c109604
commit
73b2277af8
5
client.c
5
client.c
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
6
server.c
6
server.c
@ -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;
|
||||
|
4
tmux.h
4
tmux.h
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user