Commit graph

3038 commits

Author SHA1 Message Date
Daniel Eklöf
4d9e5368a9
doc: foot.1: no need to say foot.ini twice 2020-11-26 18:22:22 +01:00
Daniel Eklöf
bb0b3ab122
changelog: update contributor list 2020-11-25 20:43:59 +01:00
Daniel Eklöf
d151d4bc50
Merge branch 'dont-reflow-alt-screen'
Closes #221
2020-11-25 20:33:56 +01:00
Daniel Eklöf
434c8e4121
grid: resize_without_reflow: don’t call min() on every loop iteration 2020-11-25 20:33:07 +01:00
Daniel Eklöf
9a498038d6
resize: don’t reflow text on alt screen
Alt screen applications normally reflow/readjust themselves on a
window resize.

When we do it too, the result is graphical glitches/flashes since our
re-flowed text is rendered in one frame, and the application re-flowed
text soon thereafter.

We can’t avoid rendering some kind of re-flowed frame, since we don’t
know when, or even if, the application will update itself. To avoid
glitches, we need to render, as closely as possible, what the
application itself will render shortly.

This is actually pretty simple; we just need to copy the visible
content over from the old grid to the new grid. We don’t bother with
text re-flow, but simply truncate long lines.

To simplify things, we simply cancel any active selection (since often
times, it will be corrupted anyway when the application redraws
itself).

Since we’re not reflowing text, there’s no need to translate e.g. the
cursor position - we just keep the current position (but bounded to
the new dimensions).

Fun thing: ‘less’ gets corrupted if we don’t leave the cursor at
the (new) bottom row. To handle this, we check if the cursor (before
resize) is at the bottom row, and if so, we move it to the new bottom
row.

Closes #221
2020-11-25 07:47:40 +01:00
Daniel Eklöf
c2f043f906
Merge branch 'wl_output'
Closes #219
2020-11-25 07:43:57 +01:00
Kenny Levinsen
ab6327da26 wayland: Use wl_output_release with wl_output v3
wl_output_release, the use of which was recently introduced, is not
available until wl_output interface version 3.

However, only wl_output version 2 was bound. This lead to protocol
errors when a display was disconnected, causing foot to terminate.

Instead, only use wl_output_release if wl_output version 3 is provided
and bound. Otherwise, just use wl_output_destroy.

Closes: https://codeberg.org/dnkl/foot/issues/219
2020-11-25 00:19:23 +01:00
Daniel Eklöf
519eb24282
Merge branch 'sixel-pgo' 2020-11-24 21:35:28 +01:00
Daniel Eklöf
c03a4f6ffb
pkgbuild: add --sixel to generate-alt-random-writes 2020-11-24 21:31:44 +01:00
Daniel Eklöf
7755af5bea
install: add --sixel to suggested command line for generate-alt-random-writes 2020-11-24 21:31:44 +01:00
Daniel Eklöf
d2f0b82bda
scripts: generate-alt-random-writes: add --sixel
When --sixel is specified, we generate random sixel images in the
‘normal’ screen, after exiting the alt screen.
2020-11-24 21:31:34 +01:00
Daniel Eklöf
22c354c8fd
term: place frequently accessed members first in term struct
To hopefully use the cache better.
2020-11-24 20:55:41 +01:00
Daniel Eklöf
309e30ba97
Merge branch 'increase-sixel-default-max-size' 2020-11-24 19:24:07 +01:00
Daniel Eklöf
ba8b15d675
sixel: change default max size to 10000x10000
It used to be the size of the window. This caused images to be cropped
when the application emitting them didn’t change the max size.
2020-11-23 20:10:55 +01:00
Daniel Eklöf
90edc09697
render: don’t call term_arm_blink_timer() from multiple threads
We call term_arm_blink_timer() from render_cell(), which runs in
multiple threads.

This caused multiple blink timer FDs to be created and registered with
the FDM, later causing read failures after one of those FDs had been
closed again.

This rarely happened under normal circumstances, but was easy to
trigger when the whole screen was full of blinking text.

As a small optimization, we don’t bother taking the lock if the timer
FD already is valid.

This is safe, because:

1) If the timer FD isn’t valid, we take the lock and then call
    term_arm_blink_timer(), which again checks if the FD is already
    valid.

2) The blink timer FD cannot be closed while we’re rendering cells. It
   is only disabled in the FDM callback, which cannot execute while
   we’re rendering.
2020-11-23 19:26:00 +01:00
Daniel Eklöf
275f97381d
sixel: fix crash when an explicit sixel size had a height less than 6 pixels 2020-11-23 19:22:40 +01:00
Daniel Eklöf
8eaa195990
foot/footclient: add short options to all command line options
e813883367 added “missing” short command
line options to footclient.

Except they weren’t missing; they were intentionally missing short
options and only supported long options.

This commit makes the new/missing short options “official”, by adding
documentation, zsh completions and including them in usage().
2020-11-23 19:19:19 +01:00
Daniel Eklöf
9ab1235b97
changelog: add issue ref to footclient -w/-W 2020-11-23 07:34:27 +01:00
Daniel Eklöf
a5f3aa1278
Merge branch 'footclient-w'
Closes #189.
2020-11-23 07:31:33 +01:00
Craig Barnes
b8fc2e19da client: add new "--window-size-*" options to docs and CHANGELOG.md 2020-11-22 18:52:51 +00:00
Craig Barnes
748f98e0c0 client: add "--window-size-pixels" and "--window-size-chars" options 2020-11-22 18:52:28 +00:00
Daniel Eklöf
10eda1faa5
Merge branch 'pgo'
Closes #107
2020-11-22 19:31:25 +01:00
Daniel Eklöf
46eb23adc0
pkgbuild: revert accidental update of version 2020-11-22 19:29:45 +01:00
Daniel Eklöf
24164101b3
install: minor tweaks to PGO instructions 2020-11-22 19:29:45 +01:00
Daniel Eklöf
c1eaea6f0e
changelog: update link to install instructions for PGO 2020-11-22 19:29:45 +01:00
Daniel Eklöf
6214cdeaf1
install: re-write release build instructions 2020-11-22 19:29:44 +01:00
Daniel Eklöf
af6d1aa522
install: re-write description of recommended flags, and add size comparison 2020-11-22 19:29:44 +01:00
Daniel Eklöf
e23ab4a7a3
pkgbuild: no need to run pgo input *that* many times 2020-11-22 19:29:44 +01:00
Daniel Eklöf
d3cee56a10
changelog: add note about PGO without Wayland 2020-11-22 19:29:44 +01:00
Daniel Eklöf
82a9097cc0
install: no need to run input *that* many times 2020-11-22 19:29:44 +01:00
Daniel Eklöf
daa8d129c1
pgo: feed VT data through fdm_ptmx(), not vt_from_slave()
fdm_ptmx(), the FDM callback handler for ptmx data, is just as much in
the hot path as vt_from_slave(). It is also slightly more complicated
than a read() followed by a call to vt_from_slave().

As a result, some benchmarks performed significantly worse in a
partial PGO build than in a full PGO build, since fdm_ptmx() wasn’t
PGO:d.

To be able to feed data through fdm_ptmx(), we need to set up the
delayed rendering timer FDs, configure the timeout values, and provide
a readable FD it can read the VT data from.

The latter is done with a memory FD. This ensures *all* VT data is
loaded into memory before we feed it to the parser.
2020-11-22 19:29:44 +01:00
Daniel Eklöf
ecaa3b4135
render: no need to call attrs_to_font(), we already have a font reference 2020-11-22 19:29:43 +01:00
Daniel Eklöf
cf398df62e
pgo: initialize (mouse) selection 2020-11-22 19:29:43 +01:00
Daniel Eklöf
4cd1d35c1e
pgo: initialize a dummy wayland backend
* Empty seat list
* Empty monitor list
* Add dummy terminal instance to terminal list
2020-11-22 19:29:43 +01:00
Daniel Eklöf
96db338262
scripts: generate-alt-random-writes: add unicode and multi-column chars 2020-11-22 19:29:43 +01:00
Daniel Eklöf
f75ff86fc0
install: add --attr-{bold,italic,underline} to generate-alt-random-writes 2020-11-22 19:29:43 +01:00
Daniel Eklöf
e60fd1e113
pkgbuild: add --attr-{bold,italic,underline} to generate-alt-random-writes 2020-11-22 19:29:43 +01:00
Daniel Eklöf
b437013a3b
scripts: generate-alt-random-writes: add support for bold/italic/underline 2020-11-22 19:29:43 +01:00
Daniel Eklöf
60c8637231
scripts: generate-alt-random-writes: don’t always reset all attributes 2020-11-22 19:29:43 +01:00
Daniel Eklöf
1e1fb157dc
scripts: generate-alt-random-writes: mix \e[S with \n 2020-11-22 19:29:43 +01:00
Daniel Eklöf
e1bde0b0e7
remove pre-generated input corpus for PGO 2020-11-22 19:29:43 +01:00
Daniel Eklöf
001d309b81
pgo: updated stimuli (256-indexed colors) 2020-11-22 19:29:42 +01:00
Daniel Eklöf
9ea1bb8881
pkgbuild: add --colors-256 to generate-alt-random-writes 2020-11-22 19:29:42 +01:00
Daniel Eklöf
e248f58ff6
install: add --colors-256 to generate-alt-random-writes 2020-11-22 19:29:42 +01:00
Daniel Eklöf
c679da7316
scripts: generate-alt-random-writes: add support for emitting 256-indexed colors 2020-11-22 19:29:42 +01:00
Daniel Eklöf
5aa97189df
scripts: generate-alt-random-writes: mix new/old-style RGB escapes 2020-11-22 19:29:42 +01:00
Daniel Eklöf
66527b39b1
scripts: generate-alt-random-writes: add command line arguments for cols/rows 2020-11-22 19:29:42 +01:00
Daniel Eklöf
cc850ed012
pgo: pull in selection.c in pgolib
Some of the selection functions are in the hot path, so this makes a
huge difference!
2020-11-22 19:29:40 +01:00
Daniel Eklöf
8619ebd778
pgo: support for specifying multiple stimuli files 2020-11-22 19:28:55 +01:00
Daniel Eklöf
84b24d34d2
install: small rewording and restructuring of PGO instructions 2020-11-22 19:28:55 +01:00