mirror of
https://github.com/tmux/tmux.git
synced 2025-04-09 10:28:49 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
5a551ac57f
@ -192,7 +192,7 @@ cmd_command_prompt_callback(void *data, const char *s, int done)
|
||||
|
||||
if (!done)
|
||||
free(new_template);
|
||||
if (c->prompt_callbackfn != (void *)&cmd_command_prompt_callback)
|
||||
if (c->prompt_callbackfn != cmd_command_prompt_callback)
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
@ -67,9 +67,7 @@ cmd_detach_client_exec(struct cmd *self, struct cmdq_item *item)
|
||||
const char *cmd = args_get(args, 'E');
|
||||
|
||||
if (self->entry == &cmd_suspend_client_entry) {
|
||||
tty_stop_tty(&c->tty);
|
||||
c->flags |= CLIENT_SUSPENDED;
|
||||
proc_send(c->peer, MSG_SUSPEND, -1, NULL, 0);
|
||||
server_client_suspend(c);
|
||||
return (CMD_RETURN_NORMAL);
|
||||
}
|
||||
|
||||
|
2
grid.c
2
grid.c
@ -89,7 +89,7 @@ grid_need_extended_cell(const struct grid_cell_entry *gce,
|
||||
return (1);
|
||||
if (gc->data.size != 1 || gc->data.width != 1)
|
||||
return (1);
|
||||
if ((gc->fg & COLOUR_FLAG_RGB) ||(gc->bg & COLOUR_FLAG_RGB))
|
||||
if ((gc->fg & COLOUR_FLAG_RGB) || (gc->bg & COLOUR_FLAG_RGB))
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ static void server_client_dispatch_command(struct client *, struct imsg *);
|
||||
static void server_client_dispatch_identify(struct client *, struct imsg *);
|
||||
static void server_client_dispatch_shell(struct client *);
|
||||
|
||||
/* Idenfity mode callback. */
|
||||
/* Identify mode callback. */
|
||||
static void
|
||||
server_client_callback_identify(__unused int fd, __unused short events, void *data)
|
||||
{
|
||||
@ -323,15 +323,30 @@ server_client_free(__unused int fd, __unused short events, void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
/* Suspend a client. */
|
||||
void
|
||||
server_client_suspend(struct client *c)
|
||||
{
|
||||
struct session *s = c->session;
|
||||
|
||||
if (s == NULL || (c->flags & CLIENT_DETACHING))
|
||||
return;
|
||||
|
||||
tty_stop_tty(&c->tty);
|
||||
c->flags |= CLIENT_SUSPENDED;
|
||||
proc_send(c->peer, MSG_SUSPEND, -1, NULL, 0);
|
||||
}
|
||||
|
||||
/* Detach a client. */
|
||||
void
|
||||
server_client_detach(struct client *c, enum msgtype msgtype)
|
||||
{
|
||||
struct session *s = c->session;
|
||||
struct session *s = c->session;
|
||||
|
||||
if (s == NULL)
|
||||
if (s == NULL || (c->flags & CLIENT_DETACHING))
|
||||
return;
|
||||
|
||||
c->flags |= CLIENT_DETACHING;
|
||||
notify_client("client-detached", c);
|
||||
proc_send_s(c->peer, msgtype, s->name);
|
||||
}
|
||||
|
2
tmux.c
2
tmux.c
@ -118,7 +118,7 @@ make_label(const char *label)
|
||||
uid = getuid();
|
||||
|
||||
if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
|
||||
xasprintf(&base, "%s/tmux-%u", s, uid);
|
||||
xasprintf(&base, "%s/tmux-%ld", s, (long)uid);
|
||||
else
|
||||
xasprintf(&base, "%s/tmux-%ld", _PATH_TMP, (long)uid);
|
||||
|
||||
|
3
tmux.h
3
tmux.h
@ -1342,7 +1342,7 @@ struct client {
|
||||
#define CLIENT_DEAD 0x200
|
||||
#define CLIENT_BORDERS 0x400
|
||||
#define CLIENT_READONLY 0x800
|
||||
/* 0x1000 unused */
|
||||
#define CLIENT_DETACHING 0x1000
|
||||
#define CLIENT_CONTROL 0x2000
|
||||
#define CLIENT_CONTROLCONTROL 0x4000
|
||||
#define CLIENT_FOCUSED 0x8000
|
||||
@ -1842,6 +1842,7 @@ void server_client_create(int);
|
||||
int server_client_open(struct client *, char **);
|
||||
void server_client_unref(struct client *);
|
||||
void server_client_lost(struct client *);
|
||||
void server_client_suspend(struct client *);
|
||||
void server_client_detach(struct client *, enum msgtype);
|
||||
void server_client_exec(struct client *, const char *);
|
||||
void server_client_loop(void);
|
||||
|
Loading…
Reference in New Issue
Block a user