Commit Graph

51 Commits

Author SHA1 Message Date
d9767b8112 Merge branch 'obsd-master' 2019-05-07 13:02:27 +01:00
69440d19b7 Do not use evbuffer_add_buffer because it is destructive and doesn't
work in newer libevent.
2019-05-07 10:25:15 +00:00
5489796737 Merge branch 'obsd-master' 2019-04-27 20:09:07 +01:00
dfb7bb6830 Merge hooks into options and make each one an array option. This allows
multiple commands to be easily bound to one hook. set-hook and
show-hooks remain but they are now variants of set-option and
show-options. show-options now has a -H flag to show hooks (by default
they are not shown).
2019-04-26 11:38:51 +00:00
20154f391e Merge branch 'obsd-master' 2018-07-04 15:02:25 +01:00
cc743dc296 Add set-hook -R to run a hook immediately (useful to set multiple hooks
to the same thing).
2018-07-04 12:30:52 +00:00
54c5070767 Merge branch 'obsd-master' 2017-08-30 12:01:10 +01:00
17cf1b21c6 Pass flags into cmd_find_from_* to fix prefer-unattached, reported by
Thomas Sattler.
2017-08-30 10:33:57 +00:00
f3221941f2 Merge branch 'obsd-master' 2017-05-04 10:01:12 +01:00
d98d316903 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.
2017-05-04 07:16:43 +00:00
3a8e56b282 Merge branch 'obsd-master' 2017-04-28 22:01:18 +01:00
0f2f783584 Log what is happening with window and session reference counts much more
obviously.
2017-04-28 19:13:55 +00:00
fd13731049 Merge branch 'obsd-master' 2017-04-21 22:01:14 +01:00
efaf4c16cf Make the cmd_find_* functions more obvious when looking for a client,
rather than having it inside other functions. Should be no change to the
way targets are resolved just yet.
2017-04-21 20:26:34 +00:00
4612419c14 Merge branch 'obsd-master' 2017-04-21 16:01:18 +01:00
c799425069 More unnecessary arguments now winlink points back to session. 2017-04-21 14:09:44 +00:00
0d19d78fff Merge branch 'obsd-master' 2017-01-11 16:01:16 +00:00
458b6eb600 Some tidying and tweaks to options code. 2017-01-11 14:56:44 +00:00
d54e990c4f Merge branch 'obsd-master' 2016-10-17 00:01:11 +01:00
fe106842c8 Use notifys for alerts too. 2016-10-16 22:18:04 +00:00
41e633acf5 Use the notify name string instead of going via an enum and change
existing hooks to use notifys instead.
2016-10-16 22:06:40 +00:00
1a6e696b08 Merge branch 'obsd-master' 2016-10-16 22:01:14 +01:00
d15d54c2c8 Add hook_session and hook_window formats to get information on the
affected session or window when a hook fires. Enable session-created and
session-closed hooks now that that is available.
2016-10-16 19:55:52 +00:00
3f35b5299f Provide a way for hooks to tag formats onto the commands they fire so
that the user can get at additional information - now used for the
"hook" format, more to come.
2016-10-16 19:36:37 +00:00
026ad08b56 Notifys can go via the command queue instead of using their own queue. 2016-10-16 19:15:02 +00:00
b342bd0b46 Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
c67b702588 Merge branch 'obsd-master' 2016-10-16 20:01:10 +01:00
ddc4512d2e Rewrite command queue handling. Each client still has a command queue,
but there is also now a global command queue. Instead of command queues
being dispatched on demand from wherever the command happens to be
added, they are now all dispatched from the top level server
loop. Command queues may now also include callbacks as well as commands,
and items may be inserted after the current command as well as at the end.

This all makes command queues significantly more predictable and easier
to use, and avoids the complex multiple nested command queues used by
source-file, if-shell and friends.

A mass rename of struct cmdq to a better name (cmdq_item probably) is
coming.
2016-10-16 17:55:14 +00:00
623e54788e Merge branch 'obsd-master' 2016-10-15 02:01:12 +01:00
3f138dc40c Rename a function for consistency and some spacing nits. 2016-10-15 00:12:58 +00:00
63b2547a02 Fire hooks on the simple notifys (window-renamed and session-renamed),
the complicated ones get no hooks for now (more to come).
2016-10-15 00:09:30 +00:00
9b3ae84993 Drain notifys once at the end of the server loop instead of doing it
from the end of every command queue (which could be nested).
2016-10-15 00:01:01 +00:00
b9dc855016 Merge branch 'obsd-master'
Conflicts:
	format.c
	osdep-openbsd.c
2016-10-12 09:45:49 +01:00
c426e485e5 Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
7acc4addb5 Merge branch 'obsd-master'
Conflicts:
	client.c
	tmux.1
	tmux.c
2015-06-07 23:42:25 +01:00
641a9cd3f5 Similarly, for sessions use a callback to free rather than checking
every loop.
2015-06-05 18:18:32 +00:00
10e90ae01f Change deref to the more sensible unref, and add a couple I missed before. 2015-06-05 18:06:30 +00:00
56e1132db4 Merge branch 'obsd-master' 2015-04-25 10:02:46 +00:00
aeedb464a6 Convert clients list into a TAILQ. 2015-04-24 23:17:11 +00:00
747cab4281 No need for $Id$ now. 2014-11-08 12:27:43 +00:00
48750022c0 Merge branch 'obsd-master'
Sync from OpenBSD.
2012-09-25 17:05:36 +01:00
17bbf90393 Add notification for input from a pane, from George Nachman. 2012-09-25 07:41:22 +00:00
41a448193f Send notifications to control clients. Also don't redraw client when
suspended.
2012-09-04 22:36:47 +01:00
9247c90d69 Send notifications to control clients. Also don't redraw client when
suspended.
2012-09-03 09:32:38 +00:00
56e37487a8 Sync OpenBSD patchset 1165:
Fix up window reference counting and don't crash if the rename timer
fires while the window is dead but still referenced. Fixes problem
reported by Michael Scholz.
2012-08-31 09:22:08 +00:00
58e8e0eac8 Fix up window reference counting and don't crash if the rename timer
fires while the window is dead but still referenced. Fixes problem
reported by Michael Scholz.
2012-08-21 10:00:33 +00:00
96aaa87df6 Remove osdep include. 2012-08-12 19:34:57 +00:00
c8849ac990 Sync OpenBSD patchset 1153:
Add a queue of notifys and a way to turn them off and on (we do not want
notifys to happen during some commands). Based on code from George
Nachman.
2012-08-12 19:23:01 +00:00
5385a9bb34 Add a queue of notifys and a way to turn them off and on (we do not want
notifys to happen during some commands). Based on code from George
Nachman.
2012-07-13 06:27:41 +00:00
f41efd9d89 Sync OpenBSD patchset 1069:
Add notify hooks for various events, the functions are currently empty
stubs but will be filled in for control mode later. From George Nachman.
2012-03-18 02:22:09 +00:00