This patch builds upon the prior work by @4z3 and @bytbox to add
touchscreen support to Alacritty. While some inspiration was taken from
@4z3's patch, it was rewritten from scratch.
This patch supports 4 basic touch interactions:
Tap allows emulating the mouse to enter a single LMB click. While it
would be possible to add more complicated mouse emulation including
support for RMB and others, it's likely more confusing than anything
else and could conflict with other more useful touch actions.
Scroll and Select are started by horizontal or vertical dragging. While
selection isn't particularly accurate with a fat finger, it works
reasonably well and the separation from selection through horizontal and
vertical start feels pretty natural.
Since horizontal drag is reserved for selection we do not support
horizontal scrolling inside the terminal. While it would be possible to
somewhat support it by starting a selection with vertical movement and
then scrolling horizontally afterwards, it would likely just confuse
people so it was left out.
Zoom is pretty simple in just changing the font size when a two-finger
pinch gesture is used. Performance of this is pretty terrible especially
on low-end hardware since this obviously isn't a cheap operation, but it
seems like a worthwhile addition since small touchscreen devices are
most likely to need frequent font size adjustment to make output
The `notify-debouncer-mini` spawn a thread which checks the events
every timeout, which is not desired since we want to avoid active
This commit re-implements debouncer based on the `RecommendedWatcher`
without adding an extra thread on top and not doing any busy-waiting.
This changes the default Cmd+N binding on macOS to create a new window
rather than spawning a new instance.
Initially this change was held back for further testing of the
multi-window feature. At this point all significant issues found with it
have been fixed so it should be ready for prime-time now.
When the erase in line escape sequence with a parameter of 0 (right) is
passed while the wrapline flag is already set, it will no longer clear
the last column and instead ignore the operation.
The behavior of `\e[1K` and `\e[2K` is unchanged and both will clear the
entire first line without clearing the wrapline flag.
This fixes a crash on Windows when the user resizes the window
to the point that it has the height of zero. The crash was introduced
by the glutin update, since it requires non-zero sizes for the
This patch reduces the active GPU memory consumption by disabling the
depth and stencil buffers. During original testing it reduced GPU memory
usage on Linux by almost a third.
This is a reintroduction of previously reverted patch 3475e44.