aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authornicm <nicm>2015-08-29 00:29:15 +0000
committernicm <nicm>2015-08-29 00:29:15 +0000
commitb7861f34bae7a9e00446e0a8cf2f38e220c41c79 (patch)
tree21b376c463a45225cb959029953f2f48a2a68192 /tmux.h
parent73bd8160768c5411bf96c8e2326c36f19cdd45c5 (diff)
downloadrtmux-b7861f34bae7a9e00446e0a8cf2f38e220c41c79.tar.gz
rtmux-b7861f34bae7a9e00446e0a8cf2f38e220c41c79.tar.bz2
rtmux-b7861f34bae7a9e00446e0a8cf2f38e220c41c79.zip
Better take on reducing the name timer. Again check for name changes in
the main loop after events that may have changed the pane, but do so at most once every 500 millis. If the pane changed too soon, use a timer to ensure that a check happens later.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/tmux.h b/tmux.h
index 6ac0b578..5ae7225f 100644
--- a/tmux.h
+++ b/tmux.h
@@ -47,8 +47,8 @@ extern char **environ;
*/
#define PANE_MINIMUM 2
-/* Automatic name refresh interval, in milliseconds. */
-#define NAME_INTERVAL 500
+/* Automatic name refresh interval, in microseconds. Must be < 1 second. */
+#define NAME_INTERVAL 500000
/*
* UTF-8 data size. This must be big enough to hold combined characters as well
@@ -869,8 +869,11 @@ RB_HEAD(window_pane_tree, window_pane);
/* Window structure. */
struct window {
u_int id;
+
char *name;
- struct event name_timer;
+ struct event name_event;
+ struct timeval name_time;
+
struct timeval silence_timer;
struct timeval activity_time;
@@ -2209,7 +2212,7 @@ void window_choose_collapse_all(struct window_pane *);
void window_choose_set_current(struct window_pane *, u_int);
/* names.c */
-void queue_window_name(struct window *);
+void check_window_name(struct window *);
char *default_window_name(struct window *);
char *format_window_name(struct window *);
char *parse_window_name(const char *);