diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-12-02 04:27:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 04:27:08 +0300 |
commit | 2c58e096f91b7ced0fc79679a7cd066c06c8e05f (patch) | |
tree | 2ecdabd1d87e92ff7aa9e6f7cd320c7e30a066be | |
parent | 706682646b78d34bbdad709e1c0f05aa2fc08d4d (diff) | |
download | alacritty-2c58e096f91b7ced0fc79679a7cd066c06c8e05f.tar.gz alacritty-2c58e096f91b7ced0fc79679a7cd066c06c8e05f.zip |
Ignore errors from swap_buffers
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 #6538.
-rw-r--r-- | alacritty/src/display/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs index 352b1a9c..5bb46b68 100644 --- a/alacritty/src/display/mod.rs +++ b/alacritty/src/display/mod.rs @@ -545,7 +545,7 @@ impl Display { fn swap_buffers(&self) { #[allow(clippy::single_match)] - match (self.surface.deref(), &self.context.get()) { + let res = match (self.surface.deref(), &self.context.get()) { #[cfg(not(any(target_os = "macos", windows)))] (Surface::Egl(surface), PossiblyCurrentContext::Egl(context)) if self.is_wayland && !self.debug_damage => @@ -553,8 +553,10 @@ impl Display { surface.swap_buffers_with_damage(context, &self.damage_rects) }, (surface, context) => surface.swap_buffers(context), + }; + if let Err(err) = res { + debug!("error calling swap_buffers: {}", err); } - .expect("failed to swap buffers."); } /// Update font size and cell dimensions. |