Commit graph

4212 commits

Author SHA1 Message Date
Craig Barnes
cf3eeff951 Merge branch 'vt-anywhere-fix2' 2021-05-16 11:50:19 +01:00
Daniel Eklöf
a0ab4f3f1c
Merge branch 'sixel-dont-shrink-below-sra-size' 2021-05-16 11:05:59 +02:00
Daniel Eklöf
e0f1a4ae33
sixel: don’t *ever* shrink image below its SRA size
If the image was accompanied with a “Set Raster Attributes” (SRA)
command, make sure we *never* shrink the image below the size
specified in the SRA.

Images are normally shrunk when their bottom rows are fully
transparent. This enables sixels that aren’t a multiple of 6 to be
emitted, without also emitting an SRA command.

But if there *is* an SRA command, obey it.

Verified against XTerm-367
2021-05-16 11:00:32 +02:00
Craig Barnes
d37b2a7f7b Update term->vt.state for each iteration of vt_from_slave() loop
Otherwise it may be stale when read by the anywhere() function.
2021-05-15 19:20:36 +01:00
Daniel Eklöf
92e517ae34
Merge branch 'xdg-activation'
Closes #487
2021-05-14 14:23:19 +02:00
Daniel Eklöf
8211484185
changeloge: xdg-activation support 2021-05-14 14:22:43 +02:00
Daniel Eklöf
3c898770cb
ci: try switching the gitlab CI from alpine:latest -> alpine:edge 2021-05-14 13:26:13 +02:00
Daniel Eklöf
584d2cacf1
wayland: workaround epoll-shim defining the macro close 2021-05-14 13:26:13 +02:00
Daniel Eklöf
03e1b906ab
meson: add xdg-activation-v1.xml conditionally
Only enable XDG activation when compiling against wayland-protocols
1.21. Older versions don’t have this protocol.

When available, define HAVE_XDG_ACTIVATION.

Make all usages of xdg_activation_v1 and xdg_activation_token_v1
conditional.
2021-05-14 13:26:13 +02:00
Daniel Eklöf
bf44f3f594
pgo: add wayl_win_set_urgent() stub 2021-05-14 13:26:13 +02:00
Daniel Eklöf
f5f1bc8dd9
wayland: set xdg activation token surface to our top-level 2021-05-14 13:26:13 +02:00
Daniel Eklöf
3e92361534
xdg-activation: initial support for setting urgency using XDG activation 2021-05-14 13:26:04 +02:00
Craig Barnes
95bbab8fba Merge branch 'vt-anywhere-cleanup' 2021-05-13 10:08:41 +01:00
Daniel Eklöf
cb62944dce
Merge branch 'install-tweaks' 2021-05-13 11:06:30 +02:00
Daniel Martí
8ae8635add INSTALL: fix an unclosed markdown quote
While skimming this doc, I noticed that "-Dterminfo" wasn't rendering
properly as it was lacking its closing backquote.

While at it, tweak the Arch wiki link, as it redirects to replace
/index.php with /title.
2021-05-13 09:49:38 +01:00
Craig Barnes
e4ff8d83d1 vt: make anywhere() function return term->vt.state by default
Instead of passing a `default_return` parameter, which is always
just the current state anyway.
2021-05-13 07:47:32 +01:00
Craig Barnes
8bb69f22b7 vt: clean up handling of "anywhere" actions 2021-05-13 07:47:26 +01:00
Daniel Eklöf
4ed545f4d8
Merge branch 'no-underlines-below-cell'
Closes #503
2021-05-12 20:10:58 +02:00
Daniel Eklöf
2ac8509c82
render: force underlines to be visible
In some cases, the underline position (typically provided by the font,
mind you), end up below the cell, making it visible.

Note that below the cell here means below the line. I.e. the font
provided underline position is below the font provided line height...

Oh well.

Doing this in foot rather than fcft, since other applications
typically don’t have to clip the rendered text.

Closes #503
2021-05-12 20:10:04 +02:00
Daniel Eklöf
9b5330bf29
Merge branch 'remove-plasma-quirk' 2021-05-12 20:08:56 +02:00
Daniel Eklöf
29776dbd1f
quirk: remove plasma/kwin quirk
Older version of Plasma/KWin had an issue where buffer damage recorded
before the buffer was attached were ignored. This appears to have been
fixed now.
2021-05-12 20:08:40 +02:00
Daniel Eklöf
04215bac6c
Merge branch 'double-buffering'
Closes #478
2021-05-12 20:07:40 +02:00
Daniel Eklöf
07d0acbabf
changelog: improved performance when double buffering 2021-05-12 20:07:18 +02:00
Daniel Eklöf
dc4f60fd4f
render: always do a full repaint if last buffer’s dimension doesn’t match 2021-05-12 20:06:15 +02:00
Daniel Eklöf
51dec651f4
render: add margins to buffer’s dirty region when rendering margins 2021-05-12 20:06:15 +02:00
Daniel Eklöf
945a346596
shm: clear buffer’s dirty region before returning a cached buffer
A non-busy buffer should always have an empty dirty region
2021-05-12 20:06:15 +02:00
Daniel Eklöf
37bbf44f6d
shm: set ‘age’ in newly allocated buffers to something large
This ensures we don’t try to do a partial update of fresh buffer.
2021-05-12 20:06:15 +02:00
Daniel Eklöf
0433ba8477
shm: free scroll damage before returning cached buffer 2021-05-12 20:06:15 +02:00
Daniel Eklöf
9b339a35f0
render: warn if we’re forced to double buffer at least 5 times 2021-05-12 20:06:15 +02:00
Daniel Eklöf
34becf0df0
render: code cleanup, log double buffering time
* Break out cursor cell dirtying to separate functions
* Break out handling of double buffering
* Handle buffers with age > 1 (we’re swapping between more than 2
  buffers)
* Detect full screen repaints, and skip re-applying old frame’s damage
* Use an allocated array insted of a tll list for old frame’s scroll damage
* When logging frame rendering time, including the amount used for
  double buffering.
2021-05-12 20:06:15 +02:00
Daniel Eklöf
a1d2044d75
render: subtract current frame’s damage when there’s no scroll damage
When re-applying the previous frame’s damage (due to us being forced
to double buffer), subtract the current frame’s damage from the
region-to-copy when there’s no scroll damage on the current frame.

When the current frame doesn’t have any scroll damage, the current
frame’s damage is in the same coordinate system as the previous
frame’s damage, and we can safely remove it from the region we copy
from.
2021-05-12 20:06:15 +02:00
Daniel Eklöf
15bfeea745
render: wip: re-apply last frame’s damage when forced to double buffer
When we are forced to swap between two buffers, re-apply the old
frame’s damage to the current buffer, before applying the current
frame’s damage.

First, while applying this frame’s scroll damage, copy it to the
buffer’s scroll damage list (so that we can access it via
term->render.last_buf).

Also, when iterating and rendering the grid, build a pixman region of
the damaged regions. This is currently done on a per-row basis. This
is also stored in the buffer.

Now, when being forced to double buffer, first iterate the old
buffer’s damage, and re-apply it to the current buffer. Then,
composite the old buffer on top of the current buffer, using the old
frame’s damage region as clip region. This effectively copies
everything that was rendered to the last frame. Remember, this is on a
per-row basis.

Then we go on and render the frame as usual.

Note that it would be _really_ nice if we could subtract the current
frame’s damage region from the clip region (no point in copying areas
we’re going to overwrite anyway). Unfortunately, that’s harder than it
looks; the current frame’s damage region is only valid *after* this
frame’s scroll damage have been applied, while the last frame’s damage
region is only valid *before* it’s been applied.

Translating one to the other isn’t easy, since scroll damage isn’t
just about counting lines - there may be multiple scroll damage
records, each with its own scrolling region. This creates very complex
scenarios.
2021-05-12 20:06:15 +02:00
Daniel Eklöf
434c9c3a34
shm: add damage tracking to buffer 2021-05-12 20:06:15 +02:00
Daniel Eklöf
c8b342ae51
shm: track busy buffers’ age, and add compile-time option to force double buffering
By default, age all matching buffers that are busy (i.e. in use by the
compositor).

This allows us to detect whether we can apply the current frame’s
damage directly, or if we need to prepare the buffer first (e.g. copy
old buffer, or re-apply last frame’s damage etc).
2021-05-12 20:06:04 +02:00
Daniel Eklöf
1501d36470
wayland: codespell: pre-empt -> preempt 2021-05-11 08:02:46 +02:00
Daniel Eklöf
2e8bea0a5d
wayland: add comment describing the configure preempt workaround 2021-05-10 17:57:14 +02:00
Daniel Eklöf
f930de65ef
Merge branch 'sixel-assertion'
Closes #494
2021-05-08 20:30:21 +02:00
Daniel Eklöf
aada44bc7e
changelog: sixel assertion hit when a sixel fills the scrollback 2021-05-08 20:29:35 +02:00
Daniel Eklöf
ba451af5c7
sixel: don’t emit sixels that will end up covering more than the entire scrollback
This limit can be reached by the sixel alone, or the sixel + the final
newline.

Closes #494
2021-05-08 20:28:16 +02:00
Daniel Eklöf
9bd14c0fd2
sixel: fix assertion: image is allowed to cover the entire scrollback 2021-05-08 20:28:16 +02:00
Daniel Eklöf
2f01ecbadb
Merge branch 'osc8-mem-leak'
Closes #495
2021-05-08 20:27:46 +02:00
Daniel Eklöf
f3b3bc1f71
term: reset: combine memset+initializers of vt struct 2021-05-08 20:27:20 +02:00
Daniel Eklöf
bfd3eb47ec
term: reset: fix reset of the VT struct
1. Free buffers and strings
2. memset() the vt struct
3. re-initialize members that must not be zero

We _could_ replace the memset() with explicit zeroing of all the
members. It’s just that there’s a lot of arrays, so this is much
easier.

Closes #495
2021-05-08 20:27:20 +02:00
Daniel Eklöf
bd8c936b00
term: osc8-open: assert URI in VT struct is NULL 2021-05-08 20:27:12 +02:00
Craig Barnes
758a36dac1 Merge branch 'simplify-parse_section_colors' 2021-05-08 18:30:56 +01:00
Craig Barnes
db4b206409 config: simplify parsing of "scaling-filter" values slightly 2021-05-08 16:50:49 +01:00
Craig Barnes
9c8c99c9e0 config: simplify parse_section_colors() 2021-05-08 14:56:11 +01:00
Daniel Eklöf
df6c6f5bd6
Merge branch 'config-code-size' 2021-05-08 13:58:25 +02:00
Daniel Eklöf
31f7479065
Merge branch 'color-table-config'
Closes #489
2021-05-08 13:54:14 +02:00
Ryan Farley
3b089b4203 configure full color palette in foot.ini
Allow the use of numeric keys in [colors] to configure the full set of
256 colors in the palette. Fixes #489
2021-05-08 06:40:00 -05:00