| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
|
|
|
| |
Currently, if no source specified in the OSC-52 query has data,
foot does not send any response. This does not work well with
some applications (e.g. neovim ':registers').
Also refactors the code a little bit.
Closes #2493
|
| |
|
|
|
|
|
|
|
| |
In rare cases, xdg_output_handle_done() may be called while a terminal
is shutting down. This triggered a crash in
update_terms_for_monitor(), which de-references term->window (which is
NULL for terminals shutting down).
Closes #2487
|
| |
|
|
|
|
|
|
|
|
| |
Absolute row numbers may wrap around, thus not suitable for comparison.
This may incorrectly update the selection direction and break word-wise
selection.
Compare scrollback-relative row numbers instead.
Fixes #2483.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since libxkbcommon 1.6.0, xkb_keymap_new_from_buffer() allows a
NUL-terminated string as keymap text [1]. Also the keymap text cannot
have multiple trailing NULs according to the Wayland protocol spec.
This also avoids length mismatch for munmap(), which may leak resource
when 'size % sysconf(_SC_PAGESIZE) == 1'.
Also see the original patch [2] which reported this issue.
[1]: https://github.com/xkbcommon/libxkbcommon/commit/b06aedb8ba
[2]: https://codeberg.org/dnkl/foot/pulls/2482
|
| |
|
|
| |
Closes #2467
|
| |
|
|
|
|
|
|
|
|
|
| |
A cell was previously considered empty if its content is empty.
When an empty cell has a non-default background color, truncating such
cells from the end of the line when reflowing is unexpected. Instead,
treat such cells as non-empty to preserve them.
Closes #2462
Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When terminal shutdown is in progress, calling client_destroy()
results in subsequent fdm_shutdown() (registered by term_shutdown())
always called with a dangling 'struct terminal' pointer.
This may happen when footclient and the client application exit
simultaneously in a short window. See #2432 for more information.
Fixed by not calling client_destroy() when terminal shutdown is
in progress. The client will eventually be destroyed in
term_shutdown_handler() (invoked from shutdown_maybe_done()),
so there's no resource leak.
|
| | |
|
| | |
|
| |
|
|
|
| |
They were deprecated in 1.26.0, along with the 'colors' and 'colors2'
sections.
|
| |
|
|
|
| |
They were deprecated in 1.26.0, and replaced by colors-dark and
colors-light.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this, the col/row coordinates for the mouse pointer was only
updated when the mouse either entered our window, or was moved inside
it.
However, when a window is resized without using the mouse, and the
user then clicks (again, without moving the mouse), we can get a
button event outside the cell grid, that we still think is on top of
the grid.
Example: user moves mouse over the bottom row. The window is
shrunk. Enough that the mouse is now outside the cell grid, but still
inside our window. This means we get a button event outside the
grid. But since we haven't updated the col/row coordinates, we think
it's on a row, that no longer exists.
Closes #2435
|
| |
|
|
|
|
|
|
| |
It's a compositor bug to emit a keyboard_enter() event with a NULL
surface, but has been seen happening on Hyprland. Workaround by
ignoring the event.
Closes #2438
|
| |
|
|
|
|
|
|
|
|
|
| |
This will allow for foot to be registered as a MIME type handler for
directories, allowing a "open with foot" action via xdg-open.
Some applications pass a simple directory path (eg. qbittorrent) but
others pass it as a "file://" URL (lutris), which is also sometimes
percent-encoded (calibre) but sometimes not.
This patch should be able to handle all 3 of these variants.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wl_touch has no leave event, so unmapping the surfaces cannot drop touch
focus the way it drops keyboard and pointer focus. seat->touch.surface
kept pointing at the window being destroyed, and seat->touch.state stayed
HELD/DRAGGING, so the guard in wl_touch_up() and wl_touch_motion() did not
fire. A wl_touch.up dispatched from the roundtrips in wayl_win_destroy()
then dereferenced the freed window:
#0 wl_touch_up () at input.c:3587
#12 wayl_roundtrip () at wayland.c:2416
#13 wayl_win_destroy () at wayland.c:2297
Reproduced by touching a foot window and holding while the window is
destroyed: 3/3 crashes before, 0/7 after.
|
| |
|
|
|
|
|
|
|
|
|
| |
wayland 1.26 adds wl_fixes::ack_global_remove(). Clients should call
it when they've received a global_remove() event, after doing internal
cleanup.
Not tested yet:
* Waiting for arch to update wayland to 1.26
* None of the compositors I use (or test on) implement it yet.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Applications cannot infer whether their terminal view is observable from
keyboard focus alone, so they may continue expensive rendering while the
surface is hidden.
Implement private mode 2033 and the one-shot visibility query. Report
Wayland xdg_toplevel suspension as not visible and otherwise remain
conservative by treating the terminal as potentially visible.
Amp-Thread-ID: https://ampcode.com/threads/T-019fb2b7-f245-7124-a69a-1484812532bb
Co-authored-by: Amp <amp@ampcode.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Interactive resize of a terminal window breaks current selection,
if scrollback is not empty, and option 'resize-delay-ms' is not 0.
This behavior is introduced by commit 296e75f4f5, which:
- Subtracts selection row by view offset every time render_resize()
is called, resulting in bad coordinates.
- Does not properly restore the original selection coordinates
during the final text reflow stage.
|
| |
|
|
| |
Closes #2405
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See the added comment for reasoning.
The reallocarray(3) function in libc could have been used conditionally,
when available, but since it can be implemented simply and efficiently,
the portable version may just as well be used in all cases.
See also:
* https://pubs.opengroup.org/onlinepubs/9799919799/functions/reallocarray.html#:~:text=adding-,reallocarray
* https://android.googlesource.com/platform/bionic/+/HEAD/docs/status.md#:~:text=reallocarray
* https://github.com/termux/termux-packages/tree/26826aec834182c/x11-packages/foot
* https://github.com/termux/termux-packages/blob/26826aec834182c/x11-packages/foot/reallocarray.c#L6
* https://github.com/termux/termux-packages/blob/26826aec834182c/x11-packages/foot/xmalloc.c.patch#L7
* https://github.com/termux/termux-packages/pull/17818
* https://github.com/termux/termux-packages/issues/23833 (see expanded build log)
|
| |
|
|
|
|
|
|
| |
This patch fixes rightmost boundary check for a word wrapped to
another line, where a multi-column character appears as the last
character in the original line.
Closes #2411
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In server mode, if a terminal instance triggered a tracked
notification (e.g. a bell notification, or a kitty notification), then
the foot server crashed if the terminal instance was closed before the
notification.
This happened because the notify_done() callback's user supplied
argument was the terminal instance, and this pointer was not verified
before it was de-referenced.
Fix by searching the wayland global's list of terminal instances, and
ignore the callback if the wanted terminal instance is gone.
Closes #2397
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to help e.g. scripts that wants to launch terminal instances
in a terminal agnostic way.
Many terminals were originally for X11, where the '--class' choice was
obvious. When they were ported to Wayland, it made sense for them to
keep the '--class' command line option, but have it set the
application ID instead (since "class" is not a thing on Wayland).
Let's add the alias, but minimally documented. We don't want to
_encourage_ its use after all.
Closes #2368
|
| |
|
|
| |
Closes #2363
|
| |
|
|
|
|
|
| |
This fixes a crash further down, where we try to lookup an existing
compose sequence.
Closes #2364
|
| |
|
|
|
|
|
|
|
| |
This fixes a copy-paste error where we read/modified/wrote the
private-palette instead of the shared palette.
Since the private palette is NULL in this case, that meant a crash.
Closes #2370
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Pad is always (in real life) 1, and no-one should be setting pan to
anything larger than 5 (the largest value possible to set with the
sixel init parameters). FWIW, no-one really uses anything but 1 here
either.
Clamping ensures we don't blow up allocations to something huge, or
worse, trigger an overflow that results in a pixel height of 0,
causing a division-by-zero.
Closes #2371
|
| |
|
|
|
| |
Some colors in dark theme have slightly different I assume more
correct values then previously
|
| |
|
|
|
|
|
|
|
|
| |
Eliminate the outer loop, so that when moving the cursor multiple
tab stops, we no longer iterate the tab stop list all over again.
This also fixes a DoS flaw when passing a very large value as
CHT/CBT argument, which may hang the terminal.
Closes #2360
|
| |
|
|
|
|
| |
This patch fixes a condition check in selection_update(), so that
during block selection, the selection area no longer gets incorrectly
updated when selecting back across the starting column.
|
| |
|
|
|
|
|
| |
That is, only do grapheme clustering when printing codepoints in
sequence, without any cursor movements in between.
Closes #2383
|
| |
|
|
|
|
|
|
| |
We use XKB_KEYSYM_MAX, which was added in 1.6.0. In other words, this
requirement isn't really new, but now we've formalized it in
meson.build.
Closes #2379
|
| |
|
|
|
|
|
|
|
|
| |
Copy-on-select (configured with 'selection-target') may accidentally
clear the clipboard, if the user drags the mouse a little bit when
clicking inside a terminal window.
Now we only copy if there is actual text being selected.
Closes #2327
|
| |
|
|
|
|
|
|
|
|
|
|
| |
dst_right was already being clamped, but not dst_left.
In addition to that, reject the sequence if dst_left > dst_right, or
dst_bottom > dst_top.
This is already being done for the source rectangle, in
params_to_rectangular_area().
Closes #2352
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the input URI ends with a trailing '%' (or a trailing '%N'), we
read outside the provided buffer.
On NULL terminated input, this happened to work out since we'd
correctly detect an invalid %-sequence as soon as we read the NULL
terminator.
On input that is not NULL terminated, we're out of luck.
This patch fixes this by also checking we have enough input left to
even _try_ to read the %-digits.
Also add unit tests for this particular case.
Closes #2353
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we initially implemented the kitty notification protocol, 128
bytes was enough.
Since then, the protocol has grown, and 128 bytes is no longer enough,
resulting in a crash when you try to query the protocol:
printf "\e]99;i=123:p=?;\e\\"
Results in
#0 0x7fe4fad3dcde in __sanitizer_print_stack_trace (/usr/lib/libasan.so.8+0x13dcde) (BuildId: 38f5643355445a477f07ffa9b6a83a55c87415a0)
#1 0x561ec61454e8 in print_stack_trace ../../debug.c:20
#2 0x561ec6145550 in fatal_error ../../debug.c:28
#3 0x561ec61462d0 in xvsnprintf ../../xsnprintf.c:42
#4 0x561ec614640a in xsnprintf ../../xsnprintf.c:52
#5 0x561ec6131fe6 in kitty_notification ../../osc.c:765
#6 0x561ec6139fec in osc_dispatch ../../osc.c:1511
#7 0x561ec60fcac8 in action_osc_end ../../vt.c:614
#8 0x561ec60fe6bb in state_osc_string_switch ../../vt.c:924
#9 0x561ec60ff437 in vt_from_slave ../../vt.c:1115
#10 0x561ec6078748 in fdm_ptmx ../../terminal.c:297
#11 0x561ec5ee6ed0 in fdm_poll ../../fdm.c:483
#12 0x561ec5f344d3 in main ../../main.c:676
#13 0x7fe4f9e2777d (/usr/lib/libc.so.6+0x2777d) (BuildId: 674f3ebbcb651fbc7d1189cb300acfd7d007849a)
#14 0x7fe4f9e278bb in __libc_start_main (/usr/lib/libc.so.6+0x278bb) (BuildId: 674f3ebbcb651fbc7d1189cb300acfd7d007849a)
#15 0x561ec5e77a14 in _start (/home/daniel/src/foot/bld/debug/foot+0x4b8a14) (BuildId: 9fca511350f3745edd3546ff800a763c1957e673)
Closes #2335
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We already detect if the final cursor colors (foreground/background)
are identical.
If they were, we replaced them with the default fg/bg.
Unfortunately, this can still result in an invisible cursor. For
example, if the current cell's default bg matches the current cell's
fg.
Instead, update the colors in two steps:
1. First, use the provided (cell's) fg/bg
2. If they too match, invert the cursor color
This should ensure the cursor is always visible
Closes #2323
|
| |
|
|
|
|
|
|
|
|
| |
I'm guessing, but I'm not sure, that when I initially implemented
this, XTerm ignored shift in keypad escapes.
Testing again, it doesn't. And regardless of what XTerm does, I don't
really see any reason to exclude shift from keypad escapes.
Closes #2324
|
| |
|
|
|
|
|
|
|
|
|
| |
This option allows you to configure which underline style to use with
URLs.
The default is dotted. Since before this patch, URL underlines were
always plain underlines, this means the default URL underline style
has changed, from single to dotted.
Closes #2302
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 3a2eb80d83d59d194a3d07da227431c634892ff5, we fixed an issue where
key *releases* triggered a selection reset, and viewport reset.
The same issue still exists in other input modes (unicode, search and
url mode); if the kitty keyboard protocol has been enabled, with
release events, any key press directed to e.g. search input handling,
will was not remembered, and the corresponding release event generated
a kitty keyboard event to the terminal application, and reset the
viewport and selection.
This means, for example, that scrollback search was unusable.
Fix by *never* doing any further (generic) key processing if an
alternate input mode is active.
Closes #2316
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When writing paste data to the terminal (either interactively, or as
an OSC-52 reply), we enqueue other data (key presses, for examples, or
query replies) while the paste is happening.
The idea is to send the key press _after_ all paste data has been
written, to ensure consistency.
Unfortunately, we only checked for an on-going paste. I.e. where the
paste itself hasn't yet finished. It is also possible the paste itself
has finished, but we haven't yet flushed all the paste buffers. That
is, if we were able to *receive* paste data faster than the terminal
client was able to *consume* it. In this case, we've queued up paste
data in the terminal. These are in separate queues, and when emitting
e.g. a key press, we didn't check if all _those_ queues had been
flushed yet.
Closes #2307
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pre-apply damage thread may be running when we destroy a terminal
instance, and we need to wait for it to finish before destroying the
underlying buffer.
c291194a4e593bbbb91420e81fa0111508084448 did this, but failed to
realize the thread may get re-started in the roundtrips done later in
wayl_win_destroy(); after the wait added in
c291194a4e593bbbb91420e81fa0111508084448, we unmap all
surfaces (including the main grid), and roundtrip. This means the
compositor will release the currently active buffer, and that means
_we_ will trigger the pre-apply damage thread on it. This introduces a
race, where wayl_win_destroy() may reach its shm_purge() calls before
the pre-apply damage thread has finished. That typically causes foot
to crash.
Closes #2288
|
| |
|
|
| |
Closes #2292
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This patch adds a new config option: colors{,2}.blur=no|yes. When
enabled, transparent background are also blurred.
Note that this requires the brand new ext-background-effect-v1
protocol, and specifically, that the compositor implements the blur
effect.
|
| |
|
|
|
| |
Reference: https://codeberg.org/dnkl/foot/issues/1622
Signed-off-by: Stéphane Klein <contact@stephane-klein.info>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible, but unlikely, that we've pushed a "pre-apply damage"
job to the renderer thread queue (or that we've pushed it, and the
a thread is now working on it) when we shutdown a terminal instance.
This is sometimes caught in an assertion in term_destroy(), where we
check the queue length is 0. Other times, or in release builds, we
might crash in the thread, or in the shutdown logic when freeing the
buffer chains associated with the terminal instance.
Fix by ensuring there's no pre-apply damage operation queued, or
running, before shutting down a terminal instance.
Closes #2263
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Applications often prefix the sixel with a raster attributes (RA)
sequence, where they tell us how large the sixel is. Strictly
speaking, this just tells us the size of the area to clear, but we use
it as a hint and pre-allocates the image buffer.
It's important to stress that it is valid to emit a MxN RA, and then
write sixel data outside of that area.
Foot handles this, in _most_ cases. We didn't handle the corner case
Mx0. I.e. a width > 0, but height == 0. No image buffer was allocated,
and we also failed to detect a resize was necessary when the
application started printing sixel data.
Much of this is for performance reason; we only check the minimum
necessary. For example, we only check if going outside the
pre-allocated *column* while printing sixels. *Rows* are checked on a
graphical newline.
In other words, the *current* row has to be valid when writing
sixels. And in case of Mx0, it wasn't.
Fix by forcing a height of at least one sixel (typically 6 pixels).
Closes #2267
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes an issue with the kitty keyboard protocol, where 'release'
events associated with a shortcut was sent to the client application.
Example: user triggers "scroll up". We scroll up. No key event(s) are
sent to the client application. Then the user releases the keys. we
don't do any shortcut handling on release events, and so we continue
with the normal input processing. If the kitty keyboard protocol has
been enabled (and specifically, release event reporting has been
enabled), then we'll emit a 'release' escape sequence. This in itself
is wrong, since the client application never saw the corresponding
press event. But we _also_ reset the viewport. The effect (in this
example), is that it's impossible to scroll up in the scrollback
history.
Note that we don't ignore _any_ release event, only the release event
for the (final) symbol that triggered the shortcut.
This should allow e.g. modifier keys release events to be processed
normally, if released before the shortcut key.
This is somewhat important, since the client application will have
received press events for the modifier keys leading up to the
shortcut (if modifier press/release events have been enabled in the
kitty keyboard protocol - _Report all keys as escape codes_).
Closes #2257
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, foot used xrgb surfaces for all fully opaque
surfaces, and only used argb surfaces for the main window when the
user enabled translucency.
However, several compositors have damage-like issues when we switch
between opaque and non-opaque surfaces (for example, when switching
color theme, or when toggling fullscreen).
Since the performance benefit of using non-alpha aware surfaces are
likely minor (if there's any measurable performance difference at
all!), lets workaround these compositor issues by always using argb
surfaces.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by Kitty's 'kitty-query-os_name'. Notable changes:
* Drop kitty prefix
* os_name -> os-name
* Use "uname -s" without any transformations (e.g. no lower-casing)
$ ./utils/xtgettcap query-os-name
reply: (44 chars): <ESC>P1+r71756572792d6f732d6e616d65=4C696E7578<ESC>\
query-os-name=Linux
Closes #2209
|
| |
|
|
|
| |
This option was deprecated in 1.23.0. Use colors-{dark,light}.cursor
instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main reason for having two color sections is to be able to switch
between dark and light. Thus, it's better if the section names reflect
this, rather than the more generic 'colors' and 'colors2' (which was
the dark one and which was the light one, now again?)
When the second color section was added, we kept the original name,
colors, to make sure we didn't break existing configurations, and
third-party themes.
However, in the long run, it's probably better to be specific in the
section naming, to avoid confusion.
So, add 'colors-dark', and 'colors-light'. Keep 'colors' and 'colors2'
as aliases for now, but mark them as deprecated. They WILL be removed
in a future release.
Also rename the option values for initial-color-theme, from 1/2, to
dark/light. Keep the old ones for now, marked as deprecated.
Update all bundled themes to use the new names. In the light-only
themes (i.e. themes that define a single, light, theme), use
colors-light, and set initial-color-theme=light.
Possible improvements: disable color switching if only one color
section has been explicitly configured (todo: figure out how to handle
the default color theme values...)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
299186a6547f6e038ee6f3822caf9a0fdfabceef introduced a regression,
where we don't handle SHM buffer "hiccups" correctly.
If foot, for some reason is forced to render a frame "too soon", we
might end up having multiple buffers "in flight" (i.e. committed to
the compositor). This could happen if the compositor pushes multiple
configure events rapidly, for example. Or anything else that forces
foot to render something "immediately", without waiting for a frame
callback.
The compositor typically releases both buffers at the same time (or
close to it), so the _next_ time we want to render a frame, we
have *two* buffers to pick between. The problem here is that after
299186a6547f6e038ee6f3822caf9a0fdfabceef, foot no longer purges the
additional buffer(s), but keeps all of them around. This messes up
foot's age tracking, and the _next_ time we're forced to pull two
buffers (without the compositor releasing the first one in between),
we try to apply damage tracking that is no longer valid. This results
in visual glitches. This never self-repairs, and we're stuck with
visual glitches until the window is resized, and we're forced to
allocate completely new buffers.
It is unclear why 299186a6547f6e038ee6f3822caf9a0fdfabceef stopped
removing the buffers. It was likely done early in the development, and
is no longer needed. So far, I haven't noticed any bugs by
re-introducing the buffer purging, but further testing is needed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When reporting the column/row pixel value in mouse SGR mode, we
emitted negative values when the cursor was being dragged outside the
window.
Unfortunately, negative values aren't allowed in CSI parameters, as
'-' is an intermediate value.
It was done this way, to be consistent with XTerm behavior. Allegedly,
XTerm has changed its behavior in patch 404.
With that in mind, and seeing that foot has never emitted negative
values in any other mouse mode, let's stop emitting negative values in
SGR mode too.
Closes #2226
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the viewport has been scrolled up, it is possible for a
reverse-scroll (rin) to cause the viewport to point to lines outside
the scrollback. This is an issue if the scrollback isn't full, since
in that case, the viewport will contain NULL lines. This will
potentially trigger assertions in a couple of different places.
Example backtrace:
#2 0x555555cd230c in bug ../../debug.c:44
#3 0x555555ad485e in grid_row_in_view ../../grid.h:83
#4 0x555555b15a89 in grid_render ../../render.c:3465
#5 0x555555b3b0ab in fdm_hook_refresh_pending_terminals ../../render.c:5165
#6 0x555555a74980 in fdm_poll ../../fdm.c:435
#7 0x555555ac2b85 in main ../../main.c:676
Detect when this happens, and force-move the viewport to ensure it is
valid.
Closes #2232
|
| |
|
|
|
|
|
|
|
|
|
| |
Add support for the new xdg-toplevel-tag-v1 Wayland protocol, by
exposing a new config option, `toplevel-tag`, and a corresponding
command option, `--toplevel-tag` (in both `foot` and `footclient`).
This can help the compositor with session management, or custom window
rules.
Closes #2212
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This lets the application now the current state, without having to
wait for the user to switch focus.
Fixes #2202
|
| |
|
|
|
| |
When we are in the composing state for XCompose key sequences, we
should not add the compose component keys to the search buffer.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This is needed, since we disable alpha in fullscreen, and since we use
different image buffer formats (XRGB vs. ARGB) when we have alpha
vs. when we don't (and fullscreen always disables alpha).
Normally, this happens anyway, as the window is resized when going in
or out from fullscreen. But, it's technically possible for a
compositor to change an application's fullscreen state without
resizing the window.
|
| |
|
|
|
|
|
|
| |
This fixes an off by one, where we sometimes "ate" an extra space when
extracting contents with tabs. This happened if the tab (and its
subsequent spaces) were followed by an additional space.
Closes #2194
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, we always blended towards black when dimming
text. However, with light color themes, it usually looks better if we
dim towards white instead.
This option allows you to choose which color to blend towards.
The default is 'black' in '[colors]', and 'white' in '[colors2]'.
Closes #2187
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Foot likes it when compositor releases buffer immediately, as that
means we only have to re-render the cells that have changed since the
last frame.
For various reasons, not all compositors do this. In this case, foot
is typically forced to switch between two buffers, i.e. double-buffer.
In this case, each frame starts with copying over the damage from the
previous frame, to the new frame. Then we start rendering the updated
cells.
Bringing over the previous frame's damage can be slow, if the changed
area was large (e.g. when scrolling one or a few lines, or on full
screen updates). It's also done single-threaded. Thus it not only
slows down frame rendering, but pauses everything else (i.e. input
processing). All in all, it reduces performance and increases input
latency.
But we don't have to wait until it's time to render a frame to copy
over the previous frame's damage. We can do that as soon as the
compositor has released the buffer (for the frame _before_ the
previous frame). And we can do this in a thread.
This frees up foot to continue processing input, and reduces frame
rendering time since we can now start rendering the modified cells
immediately, without first doing a large memcpy(3).
In worst case scenarios (or perhaps we should consider them best case
scenarios...), I've seen up to a 10x performance increase in frame
rendering times (this obviously does *not* include the time it takes
to copy over the previous frame's damage, since that doesn't affect
neither input processing nor frame rendering).
Implemented by adding a callback mechanism to the shm abstraction
layer. Use it for the grid buffers, and kick off a thread that copies
the previous frame's damage, and resets the buffers age to 0 (so that
foot understands it can start render to it immediately when it later
needs to render a frame).
Since we have certain way of knowing if a compositor releases buffers
immediately or not, use a bit of heuristics; if we see 10 consecutive
non-immediate releases (that is, we reset the counter as soon as we do
see an immediate release), this new "pre-apply damage" logic is
enabled. It can be force-disabled with tweak.pre-apply-damage=no.
We also need to take care to wait for the thread before resetting the
render's "last_buf" pointer (or we'll SEGFAULT in the thread...).
We must also ensure we wait for the thread to finish before we start
rendering a new frame. Under normal circumstances, the wait time is
always 0, the thread has almost always finished long before we need to
render the next frame. But it _can_ happen.
Closes #2188
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When we print a character to the grid, we must also update its OSC-8
state if an OSC-8 URI is currently active.
For double-width characters, this was only being done for the first
cell.
This causes the labels in URL mode to be off, as the link was
effectively chopped up into multiple pieces.
Closes #2179
|
| | |
|
| | |
|
| |
|
|
|
| |
This fixes an issue where we didn't record a logout record when using
the libutempter backend.
|
| |
|
|
|
|
|
|
|
|
| |
This makes the "uppercase hint character inserts selected text"
behavior added in #1975 configurable, as it can have unexpected
behavior for some users.
It defaults to "on", preserving the new behavior of `foot`, after
Fixes #2159.
|
| |
|
|
|
|
|
|
|
|
|
| |
Some of the value_to_*() functions wrote directly to the output
variable, even when the value was invalid. This often resulted in the
an actual configuration option (i.e. a member in the config struct) to
be overwritten by an invalid value.
For example, -o initial-color-theme=0 would set
conf->initial_color_theme to -1, resulting in a crash later, when
initializing a terminal instance.
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch adds the IPC infrastructure necessary to propagate
SIGUSR1/SIGUSR2 from a footclient process to the server process.
By targeting a particular footclient instance, only that particular
instance changes theme. This is different from when targeting the
server process, where all instances change theme.
Closes #2156
|
| | |
|
| |
|
|
|
|
|
| |
Don't do this. Now that we **don't** sort them, the first letter
chosen by the user is always assigned to the bottom most URL.
Closes #2140 (again)
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
When selecting 16-bit surfaces, we set pixman_fmt_without_alpha twice,
and never set pixman_fmt_with_alpha.
This caused 10-bit surfaces to be used instead, since it checks if
pixman_fmt_with_alpha has been overridden or not.
|
| |
|
|
|
|
|
|
|
|
| |
Before this patch, SIGUSR1 toggled between [colors] and
[colors2].
Now, SIGUSR1 changes to [colors], regardless of what the current color
theme is, and SIGUSR2 changes to [colors2].
Closes #2144
|
| |
|
|
|
|
|
| |
The _last_ URL is often the one you are interested in, and with this
change, it is always assigned the first (and thus the same) key.
Closes #2140
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Note: only *copy* is required to be enabled in security.osc52; paste
is optional, see
https://github.com/contour-terminal/contour/issues/1761#issuecomment-2944492097
|