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
d90ea88aa2
vt: handle ESC correctly in OSC string state
2019-07-09 11:06:20 +02:00
Daniel Eklöf
b4fdf51752
input: add support for dead keys (composing)
2019-07-09 10:00:54 +02:00
Daniel Eklöf
fd6a99d738
vt: handle UTF-8 sequences in OSC PUT
...
This is strictly speaking not correct, since we're not treating a lot
of characters that should switch state as part of the OSC string.
The correct way would be to have a specific OSC UTF8 state that parses
UTF8 strings.
2019-07-09 09:59:32 +02:00
Daniel Eklöf
8cf7d7f7ab
Merge branch 'no-more-linear'
2019-07-09 09:24:26 +02:00
Daniel Eklöf
0d24fcafd0
render: store frame callback pointer in terminal struct
...
This allows us to free it when exiting
2019-07-09 09:23:32 +02:00
Daniel Eklöf
d7bb83022d
cleanup
2019-07-09 09:18:58 +02:00
Daniel Eklöf
0f14b5298e
render: copy old contents to new grids when resizing
...
Eventually, we'll add text reflow here as well.
2019-07-09 09:12:41 +02:00
Daniel Eklöf
6d48f0f2a5
render: hackerman
2019-07-08 20:25:41 +02:00
Daniel Eklöf
729974492d
main: verify compositor has WL_SHM_FORMAT_ARGB8888
2019-07-08 16:12:02 +02:00
Daniel Eklöf
1e2a7e77f0
rgba: drop alpha channel support
2019-07-08 15:56:15 +02:00
Daniel Eklöf
69e7744e5d
render: use CAIRO_OPERATER_SOURCE to draw glyphs
...
This is *much* faster.
2019-07-08 15:51:44 +02:00
Daniel Eklöf
f1fa5a4a37
render: use doubles instead of ints
2019-07-08 15:28:33 +02:00
Daniel Eklöf
587a9c6ffe
render: use pointers to rgba foreground/background colors
...
This is faster, since we don't have to copy several large doubles when
swapping the colors.
2019-07-08 15:27:44 +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
98db7f58cb
cell: packing the cell struct seems to help performance
2019-07-07 22:03:08 +02:00
Daniel Eklöf
c35e10bd9a
render: collect glyphs over *all* update damages
2019-07-07 21:55:31 +02:00
Daniel Eklöf
f2363c2391
grid: add a fast path to grid_memmove()
...
Recognize the case where both the destination and source can be fully
accessed, and to a plain memmove() in this case.
2019-07-07 17:10:30 +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
050f7ea6ea
render: performance: don't stack allocate glyph sequence
2019-07-06 18:31:14 +02:00
Daniel Eklöf
00c5b27bfa
vt: add branch hinting to PRINT action
2019-07-06 13:25:36 +02:00
Daniel Eklöf
77e349d20d
render: reverse video only reverses the default background/foreground
2019-07-05 20:36:03 +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
450f6c7dcc
osc: recognize, but ignore, OSC 104 and OSC 105
2019-07-05 19:04:34 +02:00
Daniel Eklöf
b69282545c
osc: fix param calculation with more than one digit
2019-07-05 19:04:09 +02:00
Daniel Eklöf
b9bd637021
csi: SGR mouse tracking *is* implemented
2019-07-05 15:58:02 +02:00
Daniel Eklöf
fd25018cdd
render: fill area outside the cell grid with default bg color
2019-07-05 15:53:53 +02:00
Daniel Eklöf
1b07015d49
term: implement MOUSE_SGR mouse event reporting style
...
This style is enabled with the \e[?1006h sequence, and changes how
mouse events (button presses, releases and motion events).
2019-07-05 15:29:16 +02:00
Daniel Eklöf
a959c89b7f
input: bug: row is calculated from the cell *height*, not width
2019-07-05 15:28:39 +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
Daniel Eklöf
a102ff09f9
input: mouse events
2019-07-05 10:44:57 +02:00
Daniel Eklöf
1a341a56cc
render: load cursor theme from XCURSOR_THEME and XCURSOR_SIZE
2019-07-05 10:44:09 +02:00
Daniel Eklöf
1947d33868
render: break out rendering functions to render.{c,h}
2019-07-05 10:16:56 +02:00
Daniel Eklöf
3ba1721c0f
osc: implement change window title and icon
2019-07-05 09:50:35 +02:00
Daniel Eklöf
998ce52b7e
render: bump number of glyphs we can render in a single call
2019-07-05 09:31:03 +02:00
Daniel Eklöf
19cef74153
main: it's not the terminal emulators job to set LINES and COLUMNS
2019-07-05 09:21:12 +02:00
Daniel Eklöf
488ad5dc77
csi: manually erase alt screen when switching to it
2019-07-05 09:09:58 +02:00
Daniel Eklöf
c5fdc13ea4
term_erase(): erased cells get the currently selected background color
2019-07-05 09:09:28 +02:00
Daniel Eklöf
28d05a5528
main: initialize colors in VT state
2019-07-05 09:08:58 +02:00
Daniel Eklöf
8091f7c781
render: force a full redraw when we cannot reuse last buffer
2019-07-05 08:55:02 +02:00
Daniel Eklöf
4a35aa9724
resize: cursor reset was off-by-one when cursor was outside new size
2019-07-04 19:56:50 +02:00
Daniel Eklöf
1c737fa7bd
resize: re-align grid offset
2019-07-04 19:56:27 +02:00
Daniel Eklöf
669ef1a07a
csi: implement CSI S and CSI T (scroll up/down)
2019-07-04 19:39:23 +02:00
Daniel Eklöf
befb437411
vt: improve logging of invalid and unimplemented sequences
2019-07-04 19:35:01 +02:00
Daniel Eklöf
cb10d10fd8
vt: implement save/restore cursor+attributes
2019-07-04 19:23:25 +02:00
Daniel Eklöf
aad4db29c2
vt: handle graphical charset mode when printing a character
2019-07-04 19:17:42 +02:00