Daniel Eklöf
c80cbc9a79
input: reset modifier state on keyboard-leave
2020-01-13 19:58:57 +01:00
Daniel Eklöf
727be358df
render: resize: TIOCSWINSZ: don't include padding in ws_{x,y}pixel
2020-01-12 14:42:49 +01:00
Daniel Eklöf
1623fc0c0a
term: shorten application_synchronized_updates -> app_sync_updates
2020-01-12 12:55:19 +01:00
Daniel Eklöf
02c310d241
term: enable_application_synchronized_updates: not a noop if already enabled
...
If synchronized updates are already enabled when we receive a request
to enable them, extend the timeout.
2020-01-12 12:51:21 +01:00
Daniel Eklöf
d9bd1ef2d4
dcs: bsu/esu: add link to spec
2020-01-12 12:49:42 +01:00
Daniel Eklöf
14982159e4
dcs: abort() in bsu/esu
...
Since I haven't seen this in the wild, let's abort() to make sure we
catch when an application does this, so we can verify it really works.
2020-01-12 12:47:41 +01:00
Daniel Eklöf
21646f0059
Merge branch 'synchronized-updates'
2020-01-12 12:46:25 +01:00
Daniel Eklöf
95d2ee0cc1
term: app sync updates: disable delayed rendering timers once only
...
Disable the delayed rendering timers when enabling application
synchronized updates, not every time we've received ptmx data.
2020-01-12 12:45:34 +01:00
Daniel Eklöf
bdf127fc7e
term/render: move {enable,disable}_application_synchronized_updates()
...
From render -> terminal
2020-01-12 12:43:28 +01:00
Daniel Eklöf
afa1dbb7cc
render: add a timeout for application synchronized updates
...
This ensures we can recover from a crashing (or bad behaving)
application that sends a BSU but then never sends an ESU.
2020-01-12 12:40:42 +01:00
Daniel Eklöf
6e474e77e5
render: rename render_{enable,disable}_refresh()
2020-01-12 12:28:00 +01:00
Daniel Eklöf
cb8a0260f3
term: rename refresh_prohibited -> application_synchronized_updates
2020-01-12 12:25:58 +01:00
Daniel Eklöf
84f836c0c8
term: ptmx: cancel, and don't re-arm, delay timers when refresh has been disabled
2020-01-12 12:23:29 +01:00
Daniel Eklöf
7b27fa857f
dcs: bsu/esu: call render_{disable,enable}_refresh()
2020-01-12 12:21:31 +01:00
Daniel Eklöf
b2935e2b89
render: add render_{enable,disable}_refresh()
...
Calling render_disable_refresh() causes update requests to that
terminal to be ignored.
Calling render_enable_refresh() re-enables updates.
2020-01-12 12:19:38 +01:00
Daniel Eklöf
5ef55a7f52
dcs: abort() in bsu/esu
...
I **really** want to know if someone is using these...
2020-01-12 12:02:39 +01:00
Daniel Eklöf
a2652d2447
dcs: put: don't append data if buffer resize failed
2020-01-12 12:00:43 +01:00
Daniel Eklöf
a1ce31cd1d
dcs: use default param value of 0 in log message
2020-01-12 12:00:30 +01:00
Daniel Eklöf
35e696aa55
Merge branch 'dcs'
2020-01-12 11:58:53 +01:00
Daniel Eklöf
5a6cbb8c3e
dcs: initial handling of DCS in general
...
Add data structure to term->vt. This structure tracks the free-form
data that is passed-through, and the handler to call at the end.
Intermediates and parameters are collected by the normal VT
parser. Then, when we enter the passthrough state, we call dcs_hook().
This function checks the intermediate(s) and parameters, and selects
the appropriate unhook handler (and optionally does some execution
already).
In passthrough mode, we simply append strings to an internal
buffer. This might have to be changed in the future, if we need to
support a DCS that needs to execute as we go.
In unhook (i.e. when the DCS is terminated), we execute the unhook
handler.
As a proof-of-concept, handlers for BSU/ESU (Begin/End Synchronized
Update) has been added (but are left unimplemented).
2020-01-12 11:55:22 +01:00
Daniel Eklöf
0b30316261
render: don't bother trying to lookup glyph for empty cells
...
Depending on the font, it may not have an entry for code point '0',
which will cause us to try to load fallback fonts.
2020-01-12 01:19:41 +01:00
Daniel Eklöf
36d0f1fa5f
Merge branch 'switch-based-keymap-lookup'
2020-01-11 19:00:11 +01:00
Daniel Eklöf
53a437007e
input: comments
2020-01-11 18:59:46 +01:00
Daniel Eklöf
fed0e5c853
input: keymap_lookup: only do lookup, don't sent to client
2020-01-11 18:40:27 +01:00
Daniel Eklöf
1472383c15
keymap: remove keymap table
...
Lookup is now done in code, using a switch-statement
2020-01-11 18:37:00 +01:00
Daniel Eklöf
e658fe3da7
input: add a switch-based function that translates XKB keysym to escape data
2020-01-11 18:18:31 +01:00
Daniel Eklöf
8efedc9655
input: break out keymap lookup to a separate function
2020-01-11 17:55:45 +01:00
Daniel Eklöf
b5bb571adf
README: installation: s/debug/release/
2020-01-11 15:02:19 +01:00
Daniel Eklöf
9f3d860e61
README: install::other: do a release build, and mention profile guided
2020-01-11 14:59:57 +01:00
Daniel Eklöf
d86b0ddc21
fcft/tllist: remove git submodules
2020-01-11 14:59:39 +01:00
Daniel Eklöf
8837309c2e
keymap: add KP enter
...
This makes the keypad enter key emit "\eOM" in keypad application
mode.
2020-01-11 12:37:07 +01:00
Daniel Eklöf
5956faac01
term/wayland: use MONOTONIC timers
2020-01-10 21:33:40 +01:00
Daniel Eklöf
bdc4bf2372
README: some terminal emulators call "server mode" "daemon mode"
2020-01-10 20:48:48 +01:00
Daniel Eklöf
30f6480644
keymap: add escapes for keypad 'begin'
...
This is usually the '5' key, in non-num lock mode.
2020-01-10 20:23:56 +01:00
Daniel Eklöf
5bfc560451
Revert "terminal: use edge-triggered FDM handler for the PTY"
...
This reverts commit f5e27b49eb .
2020-01-10 19:51:16 +01:00
Daniel Eklöf
3957d50a8a
Revert "selection: use edge-triggered FDM handlers"
...
This reverts commit 5bac3cfa2c .
2020-01-10 19:49:48 +01:00
Daniel Eklöf
ed8d7f4bae
Revert "server: use edge-triggered FDM handler for the client connections"
...
This reverts commit 9141b8a657 .
2020-01-10 19:49:26 +01:00
Daniel Eklöf
9141b8a657
server: use edge-triggered FDM handler for the client connections
2020-01-10 19:30:03 +01:00
Daniel Eklöf
629a625422
server: be more resilient against bad behaving clients
...
Make both the server listening socket and the connecting client
sockets non-blocking.
Then, when reading the initial length of the setup packet, handle read
errors from partial reads separately.
Assume the client writes all four bytes of the 'length' field at once,
and bail out if we are unable to read those 4 bytes.
Limit the maximum setup packet size to 128K. This is to prevent
clients from pretending the setup packet is insanely large, causing us
to fail to malloc.
2020-01-10 19:27:17 +01:00
Daniel Eklöf
3762f1f205
terminal: make the event FD used to delay shutdown non-blocking
2020-01-10 19:25:56 +01:00
Daniel Eklöf
f5e27b49eb
terminal: use edge-triggered FDM handler for the PTY
...
This means that the read handler now has to keep reading until we get
EAGAIN.
But it also means we don't have to flip the EPOLLOUT flag in the FDM
handler back and forth when writing to the PTY.
2020-01-10 19:24:45 +01:00
Daniel Eklöf
5bac3cfa2c
selection: use edge-triggered FDM handlers
2020-01-10 19:24:04 +01:00
Daniel Eklöf
4e335422b8
wayland; fixup
2020-01-10 19:23:32 +01:00
Daniel Eklöf
7ce2cca49a
wayland: just to be sure, check return value of wl_display_read_events()
2020-01-10 19:23:08 +01:00
Daniel Eklöf
832e6f1370
wayland: make wayland socket non-blocking
2020-01-10 19:22:59 +01:00
Daniel Eklöf
a07de9ef3c
fdm: fix log message
2020-01-10 19:22:41 +01:00
Daniel Eklöf
698d5fdf06
fdm: verify FDs are non-blocking (debug builds only)
2020-01-10 19:22:10 +01:00
Daniel Eklöf
70f0f02016
fcft: bump
2020-01-09 21:09:25 +01:00
Daniel Eklöf
21a666e7eb
completions: zsh: add empty completions for options with required argument
2020-01-09 21:06:20 +01:00
Daniel Eklöf
40bb63e206
selection: finalize: ignore whether selections are 'enabled' or not
...
This fixes an issue where a "forced" selection (shift being pressed
while slave is tracking mouse events) would not finalize if the user
released shift *before* releasing the mouse button.
2020-01-06 11:59:26 +01:00