aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authornicm <nicm>2016-10-19 09:22:07 +0000
committernicm <nicm>2016-10-19 09:22:07 +0000
commit899e629bf0bc6053112cec5b65a63f1dd2330001 (patch)
tree7fb2b4739ce08ba6a6b894022dfb028585f259e5 /tmux.h
parentbc27451e156c0a4af73d016ea04827710ea70d5b (diff)
downloadrtmux-899e629bf0bc6053112cec5b65a63f1dd2330001.tar.gz
rtmux-899e629bf0bc6053112cec5b65a63f1dd2330001.tar.bz2
rtmux-899e629bf0bc6053112cec5b65a63f1dd2330001.zip
Alerts are too slow, so rather than walking all sessions and windows,
add a link of winlinks to each window and a pointer to the session to each winlink. Also rewrite the alerts processing to return to the old behaviour (alert in any window sets the flag on any winlink).
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/tmux.h b/tmux.h
index ae4b75dd..1ec2d3ca 100644
--- a/tmux.h
+++ b/tmux.h
@@ -889,12 +889,16 @@ struct window {
#define WINDOW_STYLECHANGED 0x8000
#define WINDOW_ALERTFLAGS (WINDOW_BELL|WINDOW_ACTIVITY|WINDOW_SILENCE)
+ int alerts_queued;
+ TAILQ_ENTRY(window) alerts_entry;
+
struct options *options;
struct grid_cell style;
struct grid_cell active_style;
u_int references;
+ TAILQ_HEAD(, winlink) winlinks;
RB_ENTRY(window) entry;
};
@@ -903,6 +907,7 @@ RB_HEAD(windows, window);
/* Entry on local window list. */
struct winlink {
int idx;
+ struct session *session;
struct window *window;
size_t status_width;
@@ -916,6 +921,7 @@ struct winlink {
#define WINLINK_ALERTFLAGS (WINLINK_BELL|WINLINK_ACTIVITY|WINLINK_SILENCE)
RB_ENTRY(winlink) entry;
+ TAILQ_ENTRY(winlink) wentry;
TAILQ_ENTRY(winlink) sentry;
};
RB_HEAD(winlinks, winlink);
@@ -990,6 +996,7 @@ struct session {
#define SESSION_UNATTACHED 0x1 /* not attached to any clients */
#define SESSION_PASTING 0x2
+#define SESSION_ALERTED 0x4
int flags;
u_int attached;
@@ -2069,7 +2076,6 @@ struct window *window_create(u_int, u_int);
struct window *window_create_spawn(const char *, int, char **, const char *,
const char *, const char *, struct environ *,
struct termios *, u_int, u_int, u_int, char **);
-void window_destroy(struct window *);
struct window_pane *window_get_active_at(struct window *, u_int, u_int);
struct window_pane *window_find_string(struct window *, const char *);
int window_has_pane(struct window *, struct window_pane *);