Commit graph

120 commits

Author SHA1 Message Date
Daniel Eklöf
3a50c54e7c
csi: bug: reset mouse *reporting* on CSI 1005/1006/1015l 2019-07-21 20:27:26 +02:00
Daniel Eklöf
6f282a2903
csi: remove debug logging 2019-07-21 20:27:09 +02:00
Daniel Eklöf
07aad4a534
csi: change flash log message from warning to debug 2019-07-21 19:17:10 +02:00
Daniel Eklöf
0dd8951cb3
flash: implement 'flash'
Use our own escape sequence for the 'flash' terminfo entry.

Implemented by arming a timer FD and setting a boolean that indicates
we're currently "flashing".

The renderer draws a semi-transparent yellowish layer over the entire
window when "flashing" is active.
2019-07-21 19:14:19 +02:00
Daniel Eklöf
1ff04c5e36
csi: remove erronous final 2019-07-21 18:41:22 +02:00
Daniel Eklöf
64135ae365
csi: implement CSI 22t and CSI 23t
22;0|1|2t pushes the current window title/icon to the stack, while 23
pops it.

The second parameter, 0|1|2 has the following meaning:

0 - push/pop icon+title
1 - push/pop icon
2 - push/pop title
2019-07-21 17:48:06 +02:00
Daniel Eklöf
326808f94d
csi: remove TODO; we have our own terminfo 2019-07-21 15:38:54 +02:00
Daniel Eklöf
16979927ba
csi: pick 16 first 256-colors directly from the term struct
The 16 first entries in the 256-color array are the regular and bright
colors. However, since they can be changed (eventually) at runtime, we
can't statically initialize the 256-color array.

Instead, pick the regular+bright colors directly from the terminal
struct. I.e. the first 16 entries of the 256-color array are now
unused.
2019-07-21 11:32:35 +02:00
Daniel Eklöf
7eb6ac1aec
csi: use colors from terminal struct 2019-07-21 11:31:59 +02:00
Daniel Eklöf
4109d97263
conf: config now provides the colors (though still only hardcoded colors) 2019-07-21 11:06:28 +02:00
Daniel Eklöf
29d855d7c6
term: prepare for configurable colors; add color variables to terminal 2019-07-21 10:58:09 +02:00
Daniel Eklöf
7472e9c152
csi: recognize DECRQM (CSI ? Ps $ p)
The client sends this to request the state of DEC private modes.

We don't support any of them, so for now, reply with 'reset'.
2019-07-19 09:57:51 +02:00
Daniel Eklöf
b583e63bba
csi: tweak logging: no need to mention 'CSI' twice 2019-07-19 09:57:37 +02:00
Daniel Eklöf
24e9477174
vt: handle up to two private characters 2019-07-19 09:56:59 +02:00
Daniel Eklöf
6c1b2f3c81
csi: recognize, but ignore, modifyOtherKeys et al resource setters 2019-07-18 19:48:37 +02:00
Daniel Eklöf
ba533a4993
csi: better (more correct) reply to \e[>0c 2019-07-18 15:28:18 +02:00
Daniel Eklöf
d5157c15b0
csi: color index is an 8-bit unsigned value
This fixes an issue where a large 8-bit value was signed extended into
a large 64-bit value.
2019-07-18 14:25:15 +02:00
Daniel Eklöf
df9162450d
csi: validate param before indexing into the 256-color array 2019-07-18 14:22:19 +02:00
Daniel Eklöf
b6b92a742d
csi: fix wrong variable compared in for-loop 2019-07-18 14:13:35 +02:00
Daniel Eklöf
20684afa8c
csi: implement \E[@ (ICH - insert characters) 2019-07-17 11:19:28 +02:00
Daniel Eklöf
28eef93742
vt/csi: recognize the reset sequence sent by 'reset'
However, we don't (yet) actually reset the terminal
2019-07-17 10:39:38 +02:00
Daniel Eklöf
e944eb85ac
csi: document a couple of unimplemented CSIs 2019-07-17 10:33:15 +02:00
Daniel Eklöf
770c5e97dd
csi: move 'dim' attribute from 'vt' to cell attributes 2019-07-16 13:25:45 +02:00
Daniel Eklöf
6c6543cfeb
csi: add back 'blink' attribute 2019-07-16 13:19:17 +02:00
Daniel Eklöf
ccc8ef9606
terminal: foreground/background in cell attributes are now uint32_t
This reduces the cell size, and thus improves the cache behavour
2019-07-16 13:17:51 +02:00
Daniel Eklöf
2a1c4d29e9
csi: implement \E[21m (disable bold) 2019-07-16 12:53:58 +02:00
Daniel Eklöf
7f6a4f4b6b
csi: implement FocusIn/Out events 2019-07-16 10:34:08 +02:00
Daniel Eklöf
9929e902a6
csi: recognize, but mostly ignore, cursor style configuration 2019-07-16 10:20:54 +02:00
Daniel Eklöf
4038a8a198
csi: add missing 'break' 2019-07-16 10:20:47 +02:00
Daniel Eklöf
7379198f4a
Use vt_to_slave() instead of calling write(term->ptmx, ...) everywhere 2019-07-15 15:42:21 +02:00
Daniel Eklöf
ae2ec19133
csi: remove debug logging 2019-07-15 14:00:02 +02:00
Daniel Eklöf
888de785b7
csi: erase alt screen before activating it 2019-07-15 13:59:05 +02:00
Daniel Eklöf
f63df93e15
csi: 'X': then 'end' parameter in term_erase() is *inclusive* 2019-07-15 13:55:47 +02:00
Daniel Eklöf
03b9cf2a22
csi: implement ':'-separated 24-bit color values 2019-07-15 12:35:43 +02:00
Daniel Eklöf
84c0bb8f59
csi: cancel selection when switching between 'normal' and 'alt' grid 2019-07-11 17:38:02 +02:00
Daniel Eklöf
cf71534768
terminal: remove 'blink' attribute from cell struct
This makes the other attribute bits fit in a single uint8_t, which
makes each cell smaller which improves cache usage.
2019-07-10 18:45:12 +02:00
Daniel Eklöf
454133033c
vt/csi: use vt_param_get() 2019-07-10 16:04:16 +02:00
Daniel Eklöf
96bd55f7c4
terminal: only support a single intermediate/private character 2019-07-10 15:03:16 +02:00
Daniel Eklöf
43e57e3546
csi: fix logging; 'CSI' was printed twice 2019-07-10 14:57:59 +02:00
Daniel Eklöf
9b5c044b29
terminal: rename and redefine cursor keys mode and keypad keys mode 2019-07-09 11:07:06 +02:00
Daniel Eklöf
1e2a7e77f0
rgba: drop alpha channel support 2019-07-08 15:56:15 +02:00
Daniel Eklöf
4e25019ba6
wip: grid is now represented as a grid, not a linear array
The grid is now represented with an array of row *pointers*. Each row
contains an array of cells (the row's columns).

The main point of having row pointers is we can now move rows around
almost for free.

This is useful when scrolling with scroll margins for example, where
we previously had to copy the lines in the margins. Now it's just a
matter of swapping two pointers.
2019-07-08 13:57:31 +02:00
Daniel Eklöf
48528419c4
grid: grid_memset() -> grid_memclear() 2019-07-07 17:10:15 +02:00
Daniel Eklöf
abff0e205e
csi: scroll region is not allowed past available rows 2019-07-07 17:03:22 +02:00
Daniel Eklöf
d63629b370
performance improvements
* action() returns void - this gets rid of checks in vt_from_slave()
* split up ACTION_PRINT into ACTION_PRINT (ASCII) and ACTION_UTF8_PRINT
  ACTION_PRINT is on the hot path, and we want it streamlined.
* Remove run-time checkout for unimplemented state transitions, as we
  shouldn't have any of those left.
* Don't re-load current VT state on each iteration in vt_from_slave()
2019-07-07 16:32:18 +02:00
Daniel Eklöf
b26e03fced
csi: implement reverse video 2019-07-05 20:12:40 +02:00
Daniel Eklöf
c76e620d71
csi: implement URXVT style mouse event reporting 2019-07-05 19:40:52 +02:00
Daniel Eklöf
b9bd637021
csi: SGR mouse tracking *is* implemented 2019-07-05 15:58:02 +02:00
Daniel Eklöf
1610828b8c
vt: add support for mouse motion reports 2019-07-05 15:13:06 +02:00
Daniel Eklöf
e5fc266cdb
vt: add support for \E[?1000h - report mouse button events 2019-07-05 14:24:51 +02:00