diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-09-25 07:41:22 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-09-25 07:41:22 +0000 |
commit | 17bbf90393a5599cfe82becdc5c29a7ad48012c4 (patch) | |
tree | 717f98054941d6ab55195c37db5ffe96ae636fdb /notify.c | |
parent | 0d0b3cf9a42f7d9cae2a1c150698a6ed9d9634cf (diff) | |
download | rtmux-17bbf90393a5599cfe82becdc5c29a7ad48012c4.tar.gz rtmux-17bbf90393a5599cfe82becdc5c29a7ad48012c4.tar.bz2 rtmux-17bbf90393a5599cfe82becdc5c29a7ad48012c4.zip |
Add notification for input from a pane, from George Nachman.
Diffstat (limited to 'notify.c')
-rw-r--r-- | notify.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -133,6 +133,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) { notify_add(NOTIFY_WINDOW_LAYOUT_CHANGED, NULL, NULL, w); |