Commit Graph

22 Commits (acc331c787f4d85c0909563139f7cc81c54edc55)

Author SHA1 Message Date
Tiago Cunha acc331c787 Sync OpenBSD patchset 546:
Add a per-client log of status line messages displayed while that client
exists. A new message-limit session option sets the maximum number of entries
and a command, show-messages, shows the log (bound to ~ by default).

This (and prompt history) might be better as a single global log but until
there are global options it is easier for them to be per client.
2009-11-19 22:20:04 +00:00
Tiago Cunha ee9be88946 Sync OpenBSD patchset 537:
Tidy up and fix some types, prompted by lint via deraadt.
2009-11-14 17:51:06 +00:00
Tiago Cunha 1b4a76d58f Sync OpenBSD patchset 527:
Only need to chmod +x or -x the socket when a client is created, lost or
attached, rather than every event loop.
2009-11-13 16:51:49 +00:00
Tiago Cunha 66957412d5 Sync OpenBSD patchset 508:
Switch tty key input over to happen on a read event. This is a bit more
complicated because of escape input, but in that case instead of processing a
key immediately, schedule a timer and reprocess the bufer when it expires.

This currently assumes that keys will be atomic (ie that if eg F1 is pressed
the entire sequence is present in the buffer). This is usually but not always
true, a change in the tree format so it can differentiate potential (partial)
key sequences will happens soon and will allow this to be fixed.
2009-11-08 23:26:56 +00:00
Tiago Cunha ac6092c27f Sync OpenBSD patchset 507:
Convert the key repeat timer to an event.
2009-11-08 23:24:59 +00:00
Tiago Cunha 915031b049 Sync OpenBSD patchset 505:
Move status timer check into the global once-per-second timer, this could maybe
be done better but one every second is better than once every 50 ms.
2009-11-08 23:12:35 +00:00
Tiago Cunha 02438c01b7 Sync OpenBSD patchset 504:
Use timeout events for the identify and message timers.
2009-11-08 23:11:23 +00:00
Tiago Cunha bee17719d8 Sync OpenBSD patchset 503:
Don't reenlist the client imsg event every loop, instead have a small function
to it and call it after the event triggers or after a imsg is added.
2009-11-08 23:09:36 +00:00
Tiago Cunha 971a7b2fe0 Sync OpenBSD patchset 495:
Switch tty fds over to a bufferevent.
2009-11-08 22:58:38 +00:00
Tiago Cunha dd36982ad5 Sync OpenBSD patchset 491:
Initial changes to move tmux to libevent.

This moves the client-side loops are pretty much fully over to event-based only
(tmux.c and client.c) but server-side (server.c and friends) treats libevent as
a sort of clever poll, waking up after every event to run various things.

Moving the server stuff over to bufferevents and timers and so on will come
later.
2009-11-08 22:40:36 +00:00
Tiago Cunha 5be38f2b3a Sync OpenBSD patchset 485:
Add an activity time for clients, like for sessions, and change session and
client lookup to pick the most recently used rather than the most recently
created - this is much more useful when used interactively and (because the
activity time is set at creation) should have no effect on source-file.

Based on a problem reported by Jan Johansson.
2009-11-04 22:46:25 +00:00
Tiago Cunha bbad75fb6c Sync OpenBSD patchset 483:
Change session and client activity and creation time members to have more
meaningful names.

Also, remove the code to try and update the session activity time for the
command client when a command message is received as is pointless because it
des not have a session.
2009-11-04 22:42:31 +00:00
Tiago Cunha f4514f5c60 Sync OpenBSD patchset 468:
Move the poll registration functions into the server-*.c files.
2009-10-28 23:14:15 +00:00
Tiago Cunha a5acabd923 Sync OpenBSD patchset 467:
tabs are better; ok nicm
2009-10-28 23:12:38 +00:00
Tiago Cunha 876ded6dfe Sync OpenBSD patchset 462:
Don't do anything in the client callback if the client has already died to
avoid a use-after-free (the callback is used twice, once for the client itself
and once for the tty). Fixes crashes seen by Han Boetes.
2009-10-28 23:06:41 +00:00
Tiago Cunha 6338fd78f7 Sync OpenBSD patchset 448:
Don't try to continue processing a client if the session has been destroyed.
2009-10-28 22:50:24 +00:00
Tiago Cunha 41863470ba Sync OpenBSD patchset 446:
Remove the -d flag to tmux and just use op/AX to detect default colours.

Irritatingly, although op can be used to tell if a terminal supports default
colours, it can't be used to set them because in some terminfo descriptions it
resets attributes as a side-effect (acts as sgr0) and in others it doesn't, so
it is not possible to determine reliably what the terminal state will be
afterwards. So if AX is missing and op is present, tmux just sends sgr0.

Anyone using -d for a terminal who finds they actually needed it can replace it
using terminal-overrides, but please let me know as it is probably an omission
from terminfo.
2009-10-28 22:48:35 +00:00
Tiago Cunha c4637da860 Sync OpenBSD patchset 445:
+time.h.
2009-10-28 22:46:15 +00:00
Tiago Cunha 5820efa513 Sync OpenBSD patchset 440:
Redraw checks have to after handling input or pane redraw flags set by key
presses will not be acted on.
2009-10-23 17:53:16 +00:00
Tiago Cunha e05fe0ba05 Sync OpenBSD patchset 439:
The client buffers have to be checked after every event in order to catch the
escape timers and properly reset the cursor.
2009-10-23 17:51:57 +00:00
Tiago Cunha 134a33f6e0 Adjust OpenBSD patchset 438 to the portable version. 2009-10-23 17:51:02 +00:00
Tiago Cunha cc9ef11985 Sync OpenBSD patchset 438:
Split the server code handling clients, jobs and windows off into separate
files from server.c (merging server-msg.c into the client file) and rather than
iterating over each set after poll(), allow a callback to be specified when the
fd is added and just walk once over the returned pollfds calling each callback
where needed.

More to come, getting this in so it is tested.
2009-10-23 17:49:47 +00:00