This fixes two minor issues introduced in 96f488d.
The main problem was the fact that the I/O event polling on Unix was
only started when the IPC socket feature is enabled. While generally
this is the main reason why we need to shutdown cleanly, there's no
reason why we wouldn't *always* do so. This ensures the log file is
always cleaned up properly on Unix.
Another minor issue with the signal polling was that the pipe was
registered for reading, but never drained when it was ready to be read
from. While this would mean we're already in the process of shutting
down anyway, this would redundantly send about 1000 shutdown requests,
rather than just one.
This fixes an issue where Alacritty's resources, like its socket, would
stick around after getting killed, since termination signals like
SIGTERM were not handled explicitly.
To handle these signals, the IPC thread was changed to a general-purpose
I/O polling thread, listening for events on a signal pipe and the IPC
socket.
While this does not provide support for Windows, we also do not have an
IPC socket on Windows we would need to clean up.
Closes#8805.
The flash capability was using DECSCNM (ESC[?5h/ESC[?5l) to toggle
reverse video mode for a visual bell effect. However, the vte crate
does not implement DECSCNM (private mode 5), so the sequence is
ignored as an unknown mode.
Remove the capability from terminfo so programs can accurately
determine how to ring the user (e.g. by falling back to the audible
bell as vi does).
Those are block elements in 'Symbols for Legacy Computing' that
complements the ones from original block elements, but from the opposite
side.
Part-of: #7422.
This is a second attempt at 1399545.
The previous implementation tried to use mouse focus tracking to control
IME activity, which does not work since IME focus is unrelated to the
pointer.
This patch instead inhibits IME on the first touch sequence during focus
loss, forcing a touch tap before enabling IME again. This effectively
disables IME with the touch event used to focus the window, assuming the
compositor sends the touch down before the focus-in event.
To avoid the IME opening for a brief period of time while the window is
gaining focus again, we disable IME on focus loss, then reenable it once
focus is gained again. While this does theoretically change the behavior
with pointer input, it shouldn't impact usability since IME input
without keyboard focus isn't usually possibly anyway.
Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
Pointer events shouldn't disable IME in any way, however without them
touch doesn't really work in the current implementation, so revert it
for now to make review of the proper patch for touch easier.
This reverts commit 1399545f48.
It was suggest to try building both robust and non-robust as a fallback
due to 1.5 not mandating robustness, and also not mandating extension,
so the robustness can be supported, but without the extension present.
This reverts commit 7b33cbcbc2.
Previously whenever the user would use touch gestures to make selections
or scroll the terminal, IME would automatically be enabled due to the
focus change and reduce the terminal height. This isn't ideal when the
goal is just scanning through the terminal history without making any
input.
This patch keeps track of pointer and touch focus and only enables IME
when either the pointer is within the window or a tap touch sequence was
performed to give the window 'touch focus'.
The initial touch tap sequence used to enable IME is still forwarded to
the terminal as a simulated click event, since otherwise touch devices
without virtual keyboard would be forced into a confusing additional tap
to make it work. This means that virtual keyboard users will not be able
to open the virtual keyboard without creating a click event, which
should still be preferable to the status quo.
This disables the OpenGL context's robustness feature since some GPUs
that advertise robustness support do not support sufficient capabilities
for our implementation.
Closes#8713.
As this is practically the same as deleting the file it should be
treated the same and ignored.
Moving a file from somewhere to the config file is not ignored and the config
will reload as normal.
When the mouse cursor was hidden with `hide_when_typing` enabled, hints
could still be highlighted under the hidden cursor. This typically
occurred when a hint moved underneath the stationary, hidden cursor.
This fix ensures hints are not highlighted by the mouse cursor while
it's hidden.
This adds a new `escape_args` option to `tty::Options` on Windows, which
can be used to automatically escape all arguments passed to the shell.
While useful to automatically make most arguments work on Windows, there
are some scenarios where it is not possible for users to properly
specify arguments with this option enabled (e.g.: `cmd /c`). An option
should always be present to disable this option when used.
The implementation is based on the `Command` code in Rust's STD lib.
This changes the way the touch zoom works by switching into a separate
mode when one of the touch slots is removed, allowing continuous zoom as
long as at least one slot is active.
This patch adds a new `alacritty msg get-config` subcommand which can
retrieve the current config from any Alacritty window using the IPC
socket.
The command will always print the full configuration file in JSON,
without the ability to filter which values are returned, leaning on
tools like `jq` instead of adding this complexity to Alacritty.
Contrary to deserialization, this relies heavily on the default
serialization implementations to reduce the necessary changes. Key and
Mouse bindings are omitted entirely since their structure is very
complex and they tend to just bloat the message size without having an
obvious usecase.
This fixes an issue for fullwidth characters where the `WRAPLINE` flag
would be checked for the cell containing the wide character, ignoring
the spacer after it.
To work around this, the wrapline character is now always checked based
on the cell *after* fullwidth expansion, instead of the original cell.
Closes#8586.