aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authornicm <nicm>2020-05-16 16:20:59 +0000
committernicm <nicm>2020-05-16 16:20:59 +0000
commit303d342d5fa5903983c08e4cae429e4f9480eea3 (patch)
tree150aab174cb176f9a0f8fe29e5b1eb46a65457ec /tmux.h
parentc914abfa19938fe0e41941879649b7a40e192082 (diff)
downloadrtmux-303d342d5fa5903983c08e4cae429e4f9480eea3.tar.gz
rtmux-303d342d5fa5903983c08e4cae429e4f9480eea3.tar.bz2
rtmux-303d342d5fa5903983c08e4cae429e4f9480eea3.zip
Add a client flag 'active-pane' which stores the active pane in the
client and allows it to be changed independently from the real active pane stored in the window. This is can be used with session groups which allow an independent current window (although it would be nice to have a flag for this too and remove session groups). The client active pane is only really useful interactively, many things (hooks, window-style, zooming) still use the window active pane.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/tmux.h b/tmux.h
index 3ccb005a..3bd37f05 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1508,6 +1508,14 @@ struct client_file {
};
RB_HEAD(client_files, client_file);
+/* Client window. */
+struct client_window {
+ u_int window;
+ struct window_pane *pane;
+ RB_ENTRY(client_window) entry;
+};
+RB_HEAD(client_windows, client_window);
+
/* Client connection. */
typedef int (*prompt_input_cb)(struct client *, void *, const char *, int);
typedef void (*prompt_free_cb)(void *);
@@ -1521,6 +1529,8 @@ struct client {
struct tmuxpeer *peer;
struct cmdq_list *queue;
+ struct client_windows windows;
+
pid_t pid;
int fd;
struct event event;
@@ -1585,6 +1595,7 @@ struct client {
#define CLIENT_STARTSERVER 0x10000000
#define CLIENT_REDRAWPANES 0x20000000
#define CLIENT_NOFORK 0x40000000
+#define CLIENT_ACTIVEPANE 0x80000000ULL
#define CLIENT_ALLREDRAWFLAGS \
(CLIENT_REDRAWWINDOW| \
CLIENT_REDRAWSTATUS| \
@@ -1600,7 +1611,7 @@ struct client {
(CLIENT_DEAD| \
CLIENT_SUSPENDED| \
CLIENT_DETACHING)
- int flags;
+ uint64_t flags;
struct key_table *keytable;
uint64_t redraw_panes;
@@ -2299,6 +2310,7 @@ void server_add_accept(int);
void printflike(1, 2) server_add_message(const char *, ...);
/* server-client.c */
+RB_PROTOTYPE(client_windows, client_window, entry, server_client_window_cmp);
u_int server_client_how_many(void);
void server_client_set_overlay(struct client *, u_int, overlay_check_cb,
overlay_mode_cb, overlay_draw_cb, overlay_key_cb,
@@ -2321,6 +2333,9 @@ void server_client_push_stderr(struct client *);
const char *server_client_get_cwd(struct client *, struct session *);
void server_client_set_flags(struct client *, const char *);
const char *server_client_get_flags(struct client *);
+struct window_pane *server_client_get_pane(struct client *);
+void server_client_set_pane(struct client *, struct window_pane *);
+void server_client_remove_pane(struct window_pane *);
/* server-fn.c */
void server_redraw_client(struct client *);