Commit graph

6392 commits

Author SHA1 Message Date
Daniel Eklöf
a916a6a8ca
metainfo: add recent releases, update feature list 2024-09-08 10:21:28 +02:00
Daniel Eklöf
c41f55c3a0
sixel: default bg color is now taken from the sixel palette, not the ANSI bg color
The wording in the original VT340 documentation is vague:

    Pixel positions specified as 0 are set to the current background
    color.

What does that mean? We _thought_ it meant the current ANSI background
color, as set with e.g. CSI 4x m.

It's still all a bit vague, but seeing that we have separate palettes
for text and graphic (should we?), it doesn't make sense to use the
ANSI background color as the default sixel background color.

So, use entry 0 from the sixel palette instead.
2024-09-05 07:33:05 +02:00
Daniel Eklöf
c5bb1fb2ed
notifications: BEL and OSC-777 now focuses the window on notification activation
Or put more propertly; if the notification daemon, and the
notification helper used by foot has been configured
properly (i.e. they both support XDG activation tokens), notifications
generated by BEL and OSC-777 will now raise/focus the window when the
default action of the notification is activated - typically by
clicking the notification.

Closes #1822
2024-09-05 07:16:15 +02:00
Daniel Eklöf
c15ebbfa2e
changelog: strikeout-thickness 2024-08-26 19:36:26 +02:00
Oleh Hushchenkov
b47a4dd255
add setting for strikeout thickness 2024-08-26 19:34:47 +02:00
Daniel Eklöf
01fa59b6b7
changelog: mbsntoc32() failure checks 2024-08-20 07:17:58 +02:00
Daniel Eklöf
8f9f3dbd9d
term_set_window_title(): fix bad check for invalid UTF-8
mbsntoc32() returns (size_t)-1 on failure, not (char32_t)-1.
2024-08-20 07:15:22 +02:00
Daniel Eklöf
7dd204fd31
osc: notify: fix bad check for invalid UTF-8
mbsntoc32() returns (size_t)-1 on failure, not (char32_t)-1.
2024-08-20 07:14:53 +02:00
Daniel Eklöf
be13788a4f
changelog: resize-keep-grid 2024-08-20 07:12:19 +02:00
Daniel Eklöf
b3fd994fd3
changelog: add missing reference to #1787 2024-08-20 07:12:09 +02:00
Andrew J. Hesford
1969717527
feature: add resize-keep-grid to allow text reflow on font changes 2024-08-20 07:07:29 +02:00
tokyo4j
a2fc2a986e
render: follow cursor.unfocused-style regardless of cursor.style
Before this commit, cursor.unfocused-style was effective only with
cursor.style=block
2024-08-20 06:59:33 +02:00
Daniel Eklöf
96c30cd410
term: thrd_join() returns thrd_success on success, not 0
Closes #1812
2024-08-15 17:20:12 +02:00
Daniel Eklöf
dc5ff7db28
changelog: add new 'unreleased' section 2024-08-14 12:02:56 +02:00
Daniel Eklöf
4cd65f0e70
Merge branch 'releases/1.18' 2024-08-14 12:02:36 +02:00
Daniel Eklöf
ce9c9f6be6
meson: bump version to 1.18.1 2024-08-14 12:00:20 +02:00
Daniel Eklöf
447b02b530
changelog: prepare for 1.18.1 2024-08-14 12:00:08 +02:00
Daniel Eklöf
54c1660a1e
Merge branch 'master' into releases/1.18 2024-08-14 11:59:23 +02:00
Daniel Eklöf
2896c18981
osc: regression: fix OSC-111 handling of alpha changes
When the background alpha changes from fully opaque, to transparent,
or vice versa, we need to do more than just repaint the affected
cells.

For example, we need to create new surfaces with the correct pixel
format.

OSC-11 (set background color) already does this, but the same alpha
checking logic was missing in OSC-111 (reset background color).

Fixes #1801
2024-08-14 08:53:45 +02:00
Daniel Eklöf
eb185bfa47
utils/xtgettcap: fix possible NULL deref, found by -fanalyzer 2024-08-14 08:53:21 +02:00
Daniel Eklöf
cee0c5423a
main: spell out the most common reason for setlocale() to fail 2024-08-13 17:33:31 +02:00
Daniel Eklöf
6d351ffc43
main: invalid locale != non-UTF-8 locale
When doing locale fallback, and printing user notifications and log
warnings, better separate the case "locale is invalid" from "locale is
valid but not UTF-8".

Closes #1798
2024-08-13 17:33:23 +02:00
Daniel Eklöf
7e1894978f
slave: prefix user notifications with 'foot'
To make it clearer _who_ is emitting the warning/errors
2024-08-09 13:55:21 +02:00
Daniel Eklöf
ee9c76ded0
osc: kitty: update 's' to the latest spec
* The spec now defines a couple of "standard" names. Translate these
  to the freedesktop compliant names.
* The query response no longer contains 'xdg-names', but instead list
  the supported standard names.
2024-08-09 08:25:36 +02:00
Daniel Eklöf
481ce82d66
doc: foot.ini: document the Unicode ranges covered by the builtin glyphs 2024-08-09 08:24:53 +02:00
Daniel Eklöf
bef613e656
csd: track pointer when rendering and handling CSD button clicks
* Render button as highlighted only when pointer is above them
* Releasing the mouse button while *not* on the button does *not*
  activate the button

When pressing, and holding, a mouse button, the compositor keeps
sending motion events for the surface where the button was pressed,
even if the mouse has moved outside it.

We also don't get any surface leave/enter events.

This meant that the button was rendered as highlighted, and a click
registered, if the user pressed the mouse button while on the button,
and then moved the cursor away from the button before releasing the
button.

This patch fixes it, by checking if the current cursor coordinates
fall within the button surface.
2024-08-09 08:20:59 +02:00
Daniel Eklöf
7ec9ca2b95
input: CSD buttons are now triggered when releasing the mouse button
This is how most UIs work.

Note that we (at least on River) don't get any surface enter/leave
events while a button is held. This means we can't detect if the user
pressed the mouse button while on a CSD button, but then moves the
mouse outside. Releasing the mouse button will still activate the CSD
button.

Closes #1787
2024-08-09 08:20:36 +02:00
Daniel Eklöf
803f712332
meson: add "prefix: '#include <unistd.h>" to cc.has_function()
When checking for execvpe, include <unistd.h>
2024-08-09 08:15:13 +02:00
Shogo Yamazaki
9d5d84a835
meson: fix false positive detection of memfd_create
Add the arguments to `has_function` to properly detect availability of the
function on SDK environments.
2024-08-09 08:14:12 +02:00
Daniel Eklöf
01eca82d33
readme: remove CI badges for gitlab and sr.ht 2024-08-07 17:15:00 +02:00
Daniel Eklöf
8607fb6312
readme: repology: use four columns instead of three 2024-08-07 17:14:26 +02:00
Daniel Eklöf
a0b5f79f32
readme: repology: use three columns instead of one 2024-08-07 17:13:38 +02:00
Daniel Eklöf
fb74a2df27
changelog: osc-99: sound support 2024-08-04 15:23:33 +02:00
Daniel Eklöf
84d36606cb
osc: kitty notifications: add support for XDG sound names 2024-08-04 15:23:31 +02:00
Daniel Eklöf
6349262491
osc: kitty notifications: implement s=silent
This implements part of the new 's' (sound) parameter; the 'silent'
value. When s=silent, we set the ${muted} template argument to
"true". It is intended to set the 'suppress-sound' hint:

    notify-send --hint BOOLEAN:suppress-sound:${muted}
2024-08-04 14:20:35 +02:00
Daniel Eklöf
a3a35f2c8c
term: reload_fonts(): don't ignore return value of thrd_join()
This should fix the

    ‘ret’ may be used uninitialized

warning

Closes #1789
2024-08-04 11:55:25 +02:00
Craig Barnes
b27841e1b5 Merge branch 'xstrjoin3' 2024-08-03 10:42:37 +01:00
Daniel Eklöf
6b72108ee2
osc: kitty notifications: ignore invalid IDs
Notification IDs must only use characters from [a-zA-Z0-9_-+.]

    Terminals **must** sanitize ids received from client programs
    before sending them back in responses, to mitigate input injection
    based attacks. That is, they must either reject ids containing
    characters not from the above set, or remove bad characters when
    reading ids sent to them.

Foot implements the first: reject IDs containing characters not from
the above set.
2024-08-03 11:05:58 +02:00
Craig Barnes
f87c9bb9f7 xmalloc: remove delim param from xstrjoin() and add separate xstrjoin3()
This avoids the need for an unused third argument for most xstrjoin()
calls and replaces the cases where it's needed with a more flexible
function. Code generation is the same in both cases, when there are 2
string params and a compile-time known delimiter.

This commit also converts 4 uses of xasprintf() to use xstrjoin*().

See also: https://godbolt.org/z/xsjrhv9b6
2024-08-03 08:51:06 +01:00
Daniel Eklöf
62b0b65d47
changelog: add new 'unreleased' section 2024-08-02 14:33:26 +02:00
Daniel Eklöf
bf51d8c19b
Merge branch 'releases/1.18' 2024-08-02 14:33:08 +02:00
Daniel Eklöf
b5e692ef8b
meson: bump version to 1.18.0 2024-08-02 14:28:16 +02:00
Daniel Eklöf
1272632f3b
changelog: prepare for 1.18.0 2024-08-02 14:27:57 +02:00
Daniel Eklöf
a176d8fbdb
readme: typo: foot -> foot's 2024-08-02 12:06:08 +02:00
Daniel Eklöf
aabb239c0f
readme: xtgettcap: mention tigetstr() compability 2024-08-02 10:33:18 +02:00
Daniel Eklöf
901daefd96
changelog: more template parameters we've added to desktop-notifications 2024-08-02 10:18:59 +02:00
Daniel Eklöf
a9e462d952
Remove a number of unused includes 2024-08-02 08:28:13 +02:00
Daniel Eklöf
09ab8c6c7c
notify: codespell: programatically -> programmatically 2024-08-02 08:25:29 +02:00
Daniel Eklöf
1a89538700
notify: codespell: notificaton -> notification 2024-08-02 08:24:03 +02:00
Daniel Eklöf
ebd8ad8937
doc: foot.ini: codespell: furhermore -> furthermore 2024-08-02 08:24:03 +02:00