This appears to improve performance, back to the levels in the master
branch.
The struct is now 24 bytes, which is still a reduction of 25%, down
from 32 bytes.
Initial benchmarks suggest we're at the same performance levels as the
master branch on all vtetest tests, and actually somewhat faster on
some of the scroll tests.
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.
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
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
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
* 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.
* 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.
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
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}
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.
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