Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream master branch #12

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open

Conversation

Hanaasagi
Copy link

@Hanaasagi Hanaasagi commented Feb 16, 2023

Update to alacritty@c435b94 for alacritty 0.13.0-dev.

Unable to be auto-merged, I fixed the following conflicts.

diff --cc alacritty/src/renderer/mod.rs
index 1f6aa672,8f708d33..00000000
--- a/alacritty/src/renderer/mod.rs
+++ b/alacritty/src/renderer/mod.rs
@@@ -18,7 -20,7 +22,11 @@@ use crate::renderer::graphics::Graphics
  use crate::renderer::rects::{RectRenderer, RenderRect};
  use crate::renderer::shader::ShaderError;

++<<<<<<< HEAD
 +pub mod graphics;
++=======
+ pub mod platform;
++>>>>>>> c435b94b11cb470a090d0e64a62a3f63348211f5
  pub mod rects;
  mod shader;
  mod text;
@@@ -93,20 -110,28 +117,35 @@@ impl Renderer

          info!("Running on {}", renderer);

++<<<<<<< HEAD
 +        let (text_renderer, rect_renderer, graphics_renderer) = if version.as_ref() >= "3.3" {
++=======
+         let is_gles_context = matches!(context.context_api(), ContextApi::Gles(_));
+
+         // Use the config option to enforce a particular renderer configuration.
+         let (use_glsl3, allow_dsb) = match renderer_prefernce {
+             Some(RendererPreference::Glsl3) => (true, true),
+             Some(RendererPreference::Gles2) => (false, true),
+             Some(RendererPreference::Gles2Pure) => (false, false),
+             None => (version.as_ref() >= "3.3" && !is_gles_context, true),
+         };
+
+         let (text_renderer, rect_renderer) = if use_glsl3 {
++>>>>>>> c435b94b11cb470a090d0e64a62a3f63348211f5

Take a look at https://github.com/Hanaasagi/alacritty-sixel/blob/bb0d982084f23dfba99740414bc1d8bad03f0875/alacritty/src/renderer/mod.rs#L115-L132

And ShaderProgram::new method has a new argument shader_header, this was added by alacritty@5b1dd38. I pass None value in https://github.com/Hanaasagi/alacritty-sixel/blob/bb0d982084f23dfba99740414bc1d8bad03f0875/alacritty/src/renderer/graphics/shader.rs#L86

Hugal31 and others added 30 commits October 5, 2022 13:14
Glutin is waiting for an RGBA buffer with 8-bit depth, but our icon is
16-bit depth. So we need to normalize the color data when decoding the
icon.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
This patch applies all clippy lints currently present on the latest
clippy master than are compatible with our oldstable clippy (only
exception is the `_else(||` stuff).
The output of --help did not match the man pages with regards to the
ordering of arguments for the --class flag. This has now been fixed.

Fixes alacritty#6413.
Some old hardware doesn't like universal shader approach for all the
rectangle kinds leading to ALU instruction limits. This commit fixes
it by splitting the shader per rectangle kind.

Fixes alacritty#6417.
The dash's exec doesn't have `-a` argument we rely on when running
login shell, so use zsh instead.

Fixes alacritty#6426.
The glutin 0.30.0 update decouples glutin from winit which
provides us with basis for a multithreaded renderer. This
also improves robustness of our configuration picking,
context creation, and surface handling.

As an example we're now able to start on systems without a vsync,
we don't try to build lots of contexts to check if some config works,
and so on.

That also brings us possibility to handle context losses, but that's
a future work.

Fixes alacritty#1268.
Notify v5 moved the debounced API into the notify_debouncer_mini crate.
The debounced API doesn't provide details on the type of event that
happened, just that a list of events or errors happened. Therefore,
reload is triggered on any event for a matching path.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
This fixes an issue where it was possible to update the padding of the
terminal without actually queueing an update for the renderer
projection, leading to a blurry projection.

Closes alacritty#6502.
This should help trouble shooting the renderer being created and
different renderer options to determine when something like dual-source
rendering isn't working.
Most of them are innocent and require just swap again. It was
like that before anyway due to old glutin bug in the error
handling implementation where errors won't pulled on swap buffers,
but old observed error was used.

Fixes alacritty#6538.
The `winit` crate was split off of the `glutin` crate. This patch fixes
the config link to correctly point to the winit enum instead of the old
glutin reexport.
Given that the Rect started to use signed integers saturating_sub
became irrelevant and no clamp to zero were performed. This commit
uses max instead to fix it.
Debian-based distributions provide a standard interface to launch a
terminal via the x-terminal-emulator name.  In order for a terminal
emualtor to satisfy that interface, it must

* Be VT100 compatiable
* Support the "-e <command> <args>" CLI option
* Support the "-T <title>" CLI option

Adjust the short form of --title accordingly, providing -t as an alias
to avoid breaking any existing usage.
Shipping the changelog as part of the Alacritty crate allows packagers
to use it for their packages.
This fixes a bug where semantic selection for bracket characters wasn't
working properly over multiple lines since start and end of the
selection were swapped.

Closes alacritty#6567.
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.

Closes alacritty#2881.
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
resize.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
chrisduerr and others added 22 commits January 15, 2023 22:53
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.

Closes alacritty#6159.
This adds support for horizontal mouse scrolling in mouse mode
and alternative scrolling modes.

Fixes alacritty#2185.
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.
The `notify-debouncer-mini` spawn a thread which checks the events
every timeout, which is not desired since we want to avoid active
polling.

This commit re-implements debouncer based on the `RecommendedWatcher`
without adding an extra thread on top and not doing any busy-waiting.

Fixes alacritty#6652.
This fixes crash on Wayland with multiple windows.
This should resize window by cell dimensions granularity instead of
using pixels.

Fixes alacritty#388.
This fixes the regression introduced by 2d27fff.

Fixes alacritty#6688.
This doesn't solve issue for `RALT`/`LALT`, but that part is impossible
until winit's keyboard v2 API.
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
 - Scroll
 - Select
 - Zoom

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
readable.

Closes alacritty#3671.
This is only an update to the development version and does not represent
a stable release.
@Hanaasagi Hanaasagi marked this pull request as ready for review February 16, 2023 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.