diff options
author | nicm <nicm> | 2017-05-04 07:16:43 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-05-04 07:16:43 +0000 |
commit | d98d31690354ec6b53206c0b24834c877cd8ad5a (patch) | |
tree | 8d63d0b30f4742990a6e687d4569f9981c3182a4 /window.c | |
parent | ca6a121e63c61eb45a81dc7318ed290b8dca45e6 (diff) |
Some new notifications, mainly for active pane and current window and
session:
pane-mode-changed
window-pane-changed
client-session-changed
session-window-changed
From Joshua Brot.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -355,6 +355,8 @@ window_create_spawn(const char *name, int argc, char **argv, const char *path, } else w->name = default_window_name(w); + notify_window("window-pane-changed", w); + return (w); } @@ -441,11 +443,14 @@ window_set_active_pane(struct window *w, struct window_pane *wp) w->active = TAILQ_PREV(w->active, window_panes, entry); if (w->active == NULL) w->active = TAILQ_LAST(&w->panes, window_panes); - if (w->active == wp) + if (w->active == wp) { + notify_window("window-pane-changed", w); return (1); + } } w->active->active_point = next_active_point++; w->active->flags |= PANE_CHANGED; + notify_window("window-pane-changed", w); return (1); } @@ -621,8 +626,10 @@ window_lost_pane(struct window *w, struct window_pane *wp) if (w->active == NULL) w->active = TAILQ_NEXT(wp, entry); } - if (w->active != NULL) + if (w->active != NULL) { w->active->flags |= PANE_CHANGED; + notify_window("window-pane-changed", w); + } } else if (wp == w->last) w->last = NULL; } @@ -1181,6 +1188,7 @@ window_pane_set_mode(struct window_pane *wp, const struct window_mode *mode) wp->flags |= (PANE_REDRAW|PANE_CHANGED); server_status_window(wp->window); + notify_pane("pane-mode-changed", wp); return (0); } @@ -1200,6 +1208,7 @@ window_pane_reset_mode(struct window_pane *wp) wp->flags |= (PANE_REDRAW|PANE_CHANGED); server_status_window(wp->window); + notify_pane("pane-mode-changed", wp); } void |