Daniel Eklöf
a01efd07e3
scrollback: don't allow more scrolling when already at the top or bottom
2019-07-10 14:42:48 +02:00
Daniel Eklöf
e01060caf9
render: damage the *view* too, when resizing
2019-07-10 14:34:43 +02:00
Daniel Eklöf
4cef8ed2cc
render: reset 'normal' grid's view correctly
2019-07-10 14:34:32 +02:00
Daniel Eklöf
8a65d52b21
terminal: add term_damage_view()
...
This ensures everything *visible* (i.e. maybe scrolled back content)
is re-rendered.
2019-07-10 14:32:40 +02:00
Daniel Eklöf
d8d4b34362
scrollback: fix scrolling outside initialized lines in new terminal
2019-07-10 14:28:20 +02:00
Daniel Eklöf
7594edb89b
input: generate BTN_BACK/BTN_FORWARD mouse down events when scrolling
2019-07-10 14:17:44 +02:00
Daniel Eklöf
94fdde3da7
main: hopefully fix logical error in delayed rendering
...
We want the timeout_ms to *not* be -1 (i.e. someone has requested
delayed rendering), while we're *not* getting client output.
2019-07-10 09:56:15 +02:00
Daniel Eklöf
18c61a9a2a
scrollback: fix off-by-one when grid size matches terminal/window size
2019-07-10 09:55:53 +02:00
Daniel Eklöf
1bb5afeb0a
render: don't render cursor if it is not in view
2019-07-10 09:55:50 +02:00
Daniel Eklöf
ed0fd2d442
scrollback: don't redraw if view doesn't change
2019-07-10 09:30:35 +02:00
Daniel Eklöf
1d338f8477
scrollback: don't scroll past scrollback history
2019-07-10 09:29:36 +02:00
Daniel Eklöf
b058e6384a
scrollback: initial support for mouse scrolling
2019-07-10 09:15:37 +02:00
Daniel Eklöf
bcd111d203
wip: initial scroll back support
...
Can scroll up and down, and stops when the beginning/end of history is
reached.
However, it probably breaks when the entire scrollback buffer has been
filled - we need to detect when the view has wrapped around to the
current terminal offset.
The detection of when we've reached the bottom of the history is also
flawed, and only works when we overshoot the bottom with at least a
page.
Resizing the windows while in a view most likely doesn't work.
The view will not detect a wrapped around scrollback buffer. I.e. if
the user has scrolled back, and is stationary at a view, but there is
still output being produced. Then eventually the scrollback buffer
will wrap around. In this case, the correct thing to do is make the
view start following the beginning of the history. Right now it
doesn't, meaning once the scrollback buffer wraps around, you'll start
seeing command output...
2019-07-09 16:26:36 +02:00
Daniel Eklöf
34f9d544fd
input: fix backspace escape sequences
2019-07-09 15:09:44 +02:00
Daniel Eklöf
cb8c2cdb35
input: split up keymap
...
This makes the top level table smaller, and faster to search
through. Eventually, we could do something fancy, like b-search the
top level table.
2019-07-09 15:05:07 +02:00
Daniel Eklöf
3dbef02dac
input: implement keypad application mode
...
This commit also replaces the previous (temporary) key map with a much
more complete one.
2019-07-09 14:27:26 +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
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