Commit graph

700 commits

Author SHA1 Message Date
Daniel Eklöf
bf5ad13df0
font: from_name() returns an allocated font struct 2019-10-16 22:22:26 +02:00
Daniel Eklöf
928e86b423
font: cache loaded fontconfig fallback fonts 2019-10-16 22:18:57 +02:00
Daniel Eklöf
a789230cf9
font: font_from_name() returns an allocated font struct 2019-10-16 21:52:12 +02:00
Daniel Eklöf
3ca6f9fe0b
selection: replace \r\n with \n in pasted text 2019-10-16 21:14:45 +02:00
Daniel Eklöf
bb0ce50b24
README: link to PKGBUILD 2019-10-05 16:41:20 +02:00
Daniel Eklöf
6280d58434
desktop: clean up, remove unsupported entries
* We don't support startup notifications
* We don't support a non-standard "new" action
2019-09-29 20:50:27 +02:00
Daniel Eklöf
33250bb781
PKGBUILD: version has been bumped to 0.9.0 2019-09-29 15:05:14 +02:00
Daniel Eklöf
4594899114
csi: ignore invalid scrolling regions
There must be at least one scrolling row. I.e. the bottom margin must
be larger than the top margin.

Note that trying to set an invalid region really will
be *ignored*. I.e. we *don't* reset the scrolling region.

This conforms to xterm's behavior.
2019-09-29 14:58:02 +02:00
Daniel Eklöf
5a0bb292ee
font: calculate underline/strikeout metrics in font, not main 2019-09-29 13:03:48 +02:00
Daniel Eklöf
780a346071
vt: don't log ignored execute commands
cat:ing a binary file would otherwise result in us spamming syslog.
2019-09-28 13:59:11 +02:00
Daniel Eklöf
67905c6000
render: handle compositors that does buffer swapping
Not all compositors support buffer re-use. I.e. they will call the
frame callback *before* the previous buffer has been
released. Effectively causing us to swap between two buffers.

Previously, this made us enter an infinite re-render loop, since we
considered the window 'dirty' (and in need of re-draw) when the buffer
is different from last redraw.

Now, we detect the buffer swapping case; size must match, and we must
not have any other condition that require a full repaint.

In this case, we can memcpy() the old buffer to the new one, without
dirtying the entire grid. We then update only the dirty cells (and
scroll damage).

Note that there was a bug here, where we erased the old
cursor *before* checking for a new buffer. This worked when the buffer
had *not* changed.

Now that we need to handle the case where it *has* changed, we must do
the memcpy() *before* we erase the cursor, or the re-painted cell is
lost.

This makes foot work on Plasma, without burning CPU. The memcpy() does
incur a performance penalty, but we're still (much) faster than
e.g. konsole. In fact, we're still mostly on par with Alacritty.
2019-09-27 19:33:45 +02:00
Daniel Eklöf
b87bf0dd9d
render: attach buffer *before* generating damage
Fixes 'invisible window' on Plasma
2019-09-27 19:33:10 +02:00
Daniel Eklöf
3dd5b1fe60
main: unset DESKTOP_STARTUP_ID
This is used in the desktop startup notification protocol. We don't
support it (is it even used on Wayland?), but need to ensure programs
launced from within foot doesn't inherit it.
2019-09-26 18:41:39 +02:00
Daniel Eklöf
f862f173f5
input: scale coordinates in wl_pointer_enter() 2019-09-26 18:41:26 +02:00
Daniel Eklöf
2d6369482e
main: initialize scale to '1'
This ensures we always have a valid (but possibly incorrect) scaling
value. This allows us to simplify code that uses the scale - it
doesn't have to verify the scale if valid.

Furthermore, since render_resize() is the function that actually
updates term->scale, make sure to call it *before* updating the
cursor (otherwise, the cursor will use the old scaling value).
2019-09-26 18:39:49 +02:00
Daniel Eklöf
7323f18859
PKGBUILD: explicitly set --term=xterm
The 'foot' terminfo may not be installed/available when we run the
intermediate foot binary, so explicitly use 'xterm' instead.
2019-09-26 18:37:29 +02:00
Daniel Eklöf
16f15d1a36
selection: primary: don't require compositor to implement it 2019-09-25 19:26:55 +02:00
Daniel Eklöf
5340204cbc
main: we prefer xdg-output-manager version 2, but get by with 1 2019-09-24 19:44:14 +02:00
Daniel Eklöf
b0d5af51d0
main: log (at debug level) global interfaces and their versions 2019-09-24 19:43:43 +02:00
Daniel Eklöf
d2bfb0c97c
README: that -> the 2019-09-21 21:00:40 +02:00
Daniel Eklöf
41618ee217
README: remove badges (added directly to gitlab project instead) 2019-09-21 20:51:47 +02:00
Daniel Eklöf
c222ee1462
README: add CI pipeline badge 2019-09-21 20:46:57 +02:00
Daniel Eklöf
64bf6257ec
doc: user Courier New instead of Arial in font examples
Since Courier New is monospaced, while Arial is not.
2019-09-21 20:43:29 +02:00
Daniel Eklöf
6d5d3a8d7d
It's Hz, not HZ 2019-09-21 20:09:06 +02:00
Daniel Eklöf
f20b08db3d
main: -f,--font now accepts a list of fonts
This makes -f,--font behave just like the configuration file option
'font'; the first font in the list is the primary font, and the
remaining fonts are fallback fonts used when a glyph cannot be found
in the primary font.
2019-09-21 20:01:55 +02:00
Daniel Eklöf
933e165164
doc: describe font fallback handling 2019-09-21 19:50:16 +02:00
Daniel Eklöf
10f8bffc02
PKGBUILD: need python to run generate-alt-random-writes.py 2019-09-21 19:40:02 +02:00
Daniel Eklöf
1521f47a49
README: don't emphasize entries in "known issues" list 2019-09-21 12:14:51 +02:00
Daniel Eklöf
548bc5a0ed
README: add text reflow to list of known issues 2019-09-21 12:14:03 +02:00
Daniel Eklöf
29b5a14f55
config: change default bright5 and bright 6 colors
They where previously identical to the corresponding 'regular'
colors. Now, we've done a saturated add with 0x202020 (which seems to
be roughly the difference between the other regular and bright
colors).
2019-09-21 12:09:50 +02:00
Daniel Eklöf
68e89c6fbf
config: change default 'regular0' color
0x222222 appears to be more visible against the default
background (0x111111) than 0x000000.
2019-09-21 12:01:29 +02:00
Daniel Eklöf
b2ca984ccb
main: round strikeout and underline position fallback handling 2019-09-21 00:47:17 +02:00
Daniel Eklöf
a1cd3769a3
main: round strikeout position, and ceil strikeout thickness
This fixes an issue where sometimes the strikeout thickness where
truncated to 0 (e.g. Cascadia Code).

Note that we already do this for the underline calculations.
2019-09-21 00:46:15 +02:00
Daniel Eklöf
55968413b6
render: remove assertion that isn't always true
It's not true for e.g. Cascadia code.
2019-09-21 00:45:22 +02:00
Daniel Eklöf
722290bae9
PKGBUILD: foot-terminfo depends on ncurses 2019-09-21 00:29:17 +02:00
Daniel Eklöf
31efe8c9e9
PKGBUILD: 'foot' optionally depends on 'foot-terminfo' 2019-09-21 00:26:29 +02:00
Daniel Eklöf
a26689fcdc
PKGBUILD: break out terminfo files to a separate package 2019-09-21 00:22:28 +02:00
Daniel Eklöf
ce4d2a085a
generate-alt-random-writes: reduce output size 2019-09-20 22:39:09 +02:00
Daniel Eklöf
4d558d8bed
main: names for poll FD indices 2019-09-20 22:27:27 +02:00
Daniel Eklöf
b3a419f427
main: better names of timers for delayed rendering timeouts 2019-09-20 22:21:06 +02:00
Daniel Eklöf
1a9ec997b3
main: track output refresh rate 2019-09-20 22:15:18 +02:00
Daniel Eklöf
dd26fa099b
README: formatting 2019-09-20 21:51:20 +02:00
Daniel Eklöf
5e5a0853ed
README: formatting 2019-09-20 21:50:22 +02:00
Daniel Eklöf
b16a11cc7a
README: add section with known issues 2019-09-20 21:45:10 +02:00
Daniel Eklöf
652ff5da92
main: improve delayed rendering
We now use two timers for delayed rendering; one _lower_ limit timeout
that is reset each time we receive input from the slave. We never
render *before* this timeout. Since it's reset, this means rendering
may be pushed further into the future.

To prevent this from happening indefinitely, the second timer defines
the _upper_ limit. This timer is only reset after rendering.

Thus, slave input may now increase the rendering delay, but only up to
a certain limit.

The lower limit is as before, 1ms. The upper limit is set to 16ms (the
time between frame updates on a 60HZ output).
2019-09-20 18:12:58 +02:00
Daniel Eklöf
aa41c8ceb1
footrc: zsh isn't the default shell 2019-09-20 18:12:58 +02:00
Daniel Eklöf
28ba6be0db
footrc: add missing newline at end-of-file 2019-09-20 18:12:58 +02:00
Daniel Eklöf
4cf39e5c42
meson: install footrc example file to $datadir/foot/footrc 2019-09-20 18:12:58 +02:00
Daniel Eklöf
8703ec2c93
README: combine description for escape and ctrl+g 2019-09-10 18:40:53 +02:00
Daniel Eklöf
684624c11e
csi: don't ignore the color space identifier in SGRs
Only a color space ID of '2' means the sequence is an RGB
sequence. Update existing code to verify this, and ignore sequences
with other color space IDs.

Except color space ID '5', which is the same as a regular 38;5;<idx>
sequence, but using sub-parameters instead (38:2:5:<idx>).
2019-09-04 20:28:35 +02:00