Daniel Eklöf
df65e29d0d
vt: always use hex (not octal)
2019-11-05 13:56:44 +01:00
Daniel Eklöf
27d00b15c7
vt: log hex version of printed character too
2019-11-05 13:56:25 +01:00
Daniel Eklöf
5d763b9e12
vt: always disable state_names[] array
...
It isn't used anywhere, even with LOG_ENABLE_DBG
2019-11-05 13:55:43 +01:00
Daniel Eklöf
95eaad7ce4
csi: implement DECOM - switch cursor origin between absolute and relative
...
The default is absolute mode, where 0,0 is the upper left corner of
the screen.
In relative mode, the origin is relative the top scroll margin.
Internally, we always track the current cursor position in absolute
mode. Every time we the client *sets* or *queries* the cursor position
in relative mode, we translate it to absolute.
2019-11-05 13:27:37 +01:00
Daniel Eklöf
89dbc61a34
csi: DECCOLM erases screen
2019-11-05 13:21:47 +01:00
Daniel Eklöf
33ea88aba6
vt: esc dispatch: implement DECALN
...
In esc dispatch:
* Switch on private first, then final
* Recognize ESC #8 (DECALN), and implement it
2019-11-05 11:32:56 +01:00
Daniel Eklöf
342d6036f9
csi: CSI ?3h enables 132 column mode, CSI ?3l 80 column mode
2019-11-05 11:10:56 +01:00
Daniel Eklöf
bf58b9ea8e
csi: implement force cursor position
2019-11-05 11:10:19 +01:00
Daniel Eklöf
15b12f45c6
scan-build: fix a couple of minor warnings from a scan-build run
2019-11-05 10:39:36 +01:00
Daniel Eklöf
9abc5ca971
server/client: harden reading of initialization data, and make async
...
* Client terminal initialization data is now received
asynchronously. To facilitate this, a couple of minor changes to the
protocol was made:
- The client now starts with sending a 4-byte unsigned integer
with the *total* size of the initialization data (*not*
including the size field itself.
- Strings (TERM variable + argv) are now sent NULL-terminated
* The server allocates a single buffer, and fills it
asynchronously. When full (as indicated by the initial 'total size'
integer), we parse it (taking care not to read outside boundaries
etc, and verifies the lengths (of the TERM variable and argv array)
indicated by the client matches the actual lengths of the strings
received.
* The server now ignores 'unexpected' data received from the client,
after the terminal has been instantiated.
2019-11-05 10:08:30 +01:00
Daniel Eklöf
5b3fe4492c
server: workaround evil clients
...
If the clients attempt to send more data after we've instantiated the
terminal, just consume the data but ignore it.
2019-11-05 09:31:47 +01:00
Daniel Eklöf
5f77f0e999
server: don't cache argc/argv in client context
2019-11-05 09:31:14 +01:00
Daniel Eklöf
1c7fb2869d
main: destroy cached SHM buffers *after* terminals have been destroyed
2019-11-05 09:30:24 +01:00
Daniel Eklöf
fef07138b3
terminal: ptmx: ignore *both* EPOLLIN and EPOLLOUT on EPOLLHUP
2019-11-05 09:23:13 +01:00
Daniel Eklöf
fd82caad42
selection: document the asynchronous behavior of text_from_{primary,clipboard}
2019-11-05 09:13:47 +01:00
Daniel Eklöf
b17358bd0a
selection: make text_from_{clipboard,primary} async
2019-11-05 09:09:51 +01:00
Daniel Eklöf
dd57418494
selection: initialize 'ctx' before jumping into its scope
2019-11-05 08:51:10 +01:00
Daniel Eklöf
b15032d223
selection: text_from_{clipboard,primary}: add 'done' callback
...
This callback is *always* called, including when there has been an
error.
This is in preparation for making text_from_{clipboard,primary}
asynchronous.
2019-11-05 08:49:32 +01:00
Daniel Eklöf
9cd22dc398
selection: async send: handle POLLHUP
2019-11-05 08:40:39 +01:00
Daniel Eklöf
1207ad1502
selection: free strdup:ed clipboard data on fdm failure
2019-11-05 08:40:24 +01:00
Daniel Eklöf
8824e3823e
selection: remove debug assert
2019-11-05 08:40:01 +01:00
Daniel Eklöf
bb9dad18f4
selection: typedef not needed here (copy-paste from fdm.h)
2019-11-05 08:39:39 +01:00
Daniel Eklöf
dbb51ed4c9
selection: we don't set user data on primary/clipboard data sources
2019-11-04 14:11:18 +01:00
Daniel Eklöf
739c5cf7f0
input: remove unneeded(?) term_reset_view() calls
...
Not sure why these were added here; they don't appear to be
needed (we're writing to the client - it's up to the client to echo
stuff, in which case we redraw as usual).
2019-11-04 14:10:37 +01:00
Daniel Eklöf
cebeb390e4
selection: try to write selection data synchronously first
...
Only if we fail to write everything do we switch to asynchronous mode.
2019-11-04 14:00:51 +01:00
Daniel Eklöf
3081898caf
terminal: use async_write() when writing to ptmx
2019-11-04 13:46:30 +01:00
Daniel Eklöf
9ae5c311d1
async: add async_write(), a write primitive to write to a NONBLOCK:ing FD
2019-11-04 13:46:30 +01:00
Daniel Eklöf
60c3ff8737
selection: send primary/clipboard data asynchronously
...
TODO: try writing synchronously first
2019-11-04 13:11:15 +01:00
Daniel Eklöf
a706c1e804
terminal: add comments describing the sync/async writing modes
2019-11-04 12:36:43 +01:00
Daniel Eklöf
a3f79ead94
Merge branch 'window-urgency'
2019-11-04 12:24:03 +01:00
Daniel Eklöf
5f6d230c10
csi: comment out handling of CSI ? 1042/1043 h/l
...
In Wayland, we neither _have_ an urgency hint to set, nor can we raise
the window(?)
2019-11-04 12:23:02 +01:00
Daniel Eklöf
42eef90268
csi: recognize CSI ? 1042/1043 h/l
...
1042: set 'urgency' window manager hint when receiving ctrl-g
1043: raise window when receiving ctrl-g
2019-11-04 12:00:50 +01:00
Daniel Eklöf
e46b963139
doc: foot.5: don't upper case 'one' in the middle of a sentence
2019-11-03 16:28:00 +01:00
Daniel Eklöf
db9fd03283
doc: foot.1: add description of the (mouse) wheel
2019-11-03 16:23:18 +01:00
Daniel Eklöf
ef101f0c96
doc: foot.1: spelling
2019-11-03 16:23:09 +01:00
Daniel Eklöf
988134717f
wayland: verify xdg-output-manager interface version
2019-11-03 16:14:35 +01:00
Daniel Eklöf
4e93b3a2d8
wayland: verify server implements the required interface versions
2019-11-03 15:39:26 +01:00
Daniel Eklöf
f84a59bea7
README: remove extra period
2019-11-03 13:54:12 +01:00
Daniel Eklöf
d51bee6bb3
man: foot.1: add reference to footclient(1)
2019-11-03 13:47:28 +01:00
Daniel Eklöf
0c4d43e285
man: footclient.1: initial documentation
2019-11-03 13:47:19 +01:00
Daniel Eklöf
f63c5a66ac
man: foot.1: add a DESCRIPTION
2019-11-03 13:47:03 +01:00
Daniel Eklöf
0712a6dbff
man: foot.1: document -s,--server
2019-11-03 13:46:47 +01:00
Daniel Eklöf
567989e9f3
main: usage for --server now hints about 'footclient'
2019-11-03 13:46:09 +01:00
Daniel Eklöf
61dfa1365e
slave: restore signals before calling exec()
2019-11-03 13:24:15 +01:00
Daniel Eklöf
d26c67e589
main: ignore SIGHUP in master process
2019-11-03 13:23:49 +01:00
Daniel Eklöf
a8cb6c531e
Remove unneeded include
2019-11-03 13:07:19 +01:00
Daniel Eklöf
d3e4ba6c94
slave: remove unneeded define
2019-11-03 13:02:16 +01:00
Daniel Eklöf
78cd93f030
terminal: malloc_trim() is a GNU extension
2019-11-03 12:57:47 +01:00
Daniel Eklöf
2195e2cf71
terminal: trim memory after free:ing a terminal
...
A terminal with lots of scrollback history will have allocated a lot
of memory.
Normally, free() wont return this memory to the OS, and we don't seem
to trigger the automatic trim calls.
This means the server would accumulate quite a lot of memory over
time, as terminals come and go.
Now we explicitly trim the memory every time a terminal is destroyed.
2019-11-03 12:48:18 +01:00
Daniel Eklöf
ffadb5f020
README: updates
...
* Multiple windows _are_ supported, sort of, via --server
* Add note about GNOME not having SSDs
* Add mouse wheel to list of keyboard/mouse shortcuts
2019-11-03 12:24:14 +01:00