From 17bbf90393a5599cfe82becdc5c29a7ad48012c4 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 25 Sep 2012 07:41:22 +0000 Subject: Add notification for input from a pane, from George Nachman. --- notify.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'notify.c') diff --git a/notify.c b/notify.c index 8fe792c1..75a16de9 100644 --- a/notify.c +++ b/notify.c @@ -132,6 +132,26 @@ notify_drain(void) } } +void +notify_input(struct window_pane *wp, struct evbuffer *input) +{ + struct client *c; + u_int i; + + /* + * notify_input() is not queued and only does anything when + * notifications are enabled. + */ + if (!notify_enabled) + return; + + for (i = 0; i < ARRAY_LENGTH(&clients); i++) { + c = ARRAY_ITEM(&clients, i); + if (c != NULL && (c->flags & CLIENT_CONTROL)) + control_notify_input(c, wp, input); + } +} + void notify_window_layout_changed(struct window *w) { -- cgit