Skip to content

A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.

feat(config): default the renderer to OpenGL on Windows

RoversXbe8da43c3142
diff --git a/config/src/frontend.rs b/config/src/frontend.rs
index 7bd68d19..75bdfca7 100644
--- a/config/src/frontend.rs
+++ b/config/src/frontend.rs
@@ -1,20 +1,30 @@
use luahelper::impl_lua_conversion_dynamic;
use wezterm_dynamic::{FromDynamic, ToDynamic};
-#[derive(Debug, Clone, Copy, PartialEq, Eq, FromDynamic, ToDynamic, Default)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, FromDynamic, ToDynamic)]
pub enum FrontEndSelection {
+ /// The default on Windows. It falls back to WebGpu the way WebGpu falls
+ /// back to it, so a machine without a usable OpenGL still opens.
OpenGL,
- /// The default since the main window learned to fall back: wgpu asks for
- /// every backend it has (Metal, then DX12/Vulkan/GL depending on the
- /// platform; on Windows GL is left out where OpenGL would be Mesa), and
- /// if none of them can be brought up the window quietly opens on OpenGL
- /// instead of failing to open at all. OpenGL falls back to WebGpu the same
- /// way; Software never falls back.
- #[default]
+ /// The default elsewhere since the main window learned to fall back: wgpu
+ /// asks for every backend it has (Metal, then DX12/Vulkan/GL depending on
+ /// the platform; on Windows GL is left out where OpenGL would be Mesa),
+ /// and if none of them can be brought up the window quietly opens on
+ /// OpenGL instead of failing to open at all. Software never falls back.
WebGpu,
Software,
}
+impl Default for FrontEndSelection {
+ fn default() -> Self {
+ if cfg!(windows) {
+ Self::OpenGL
+ } else {
+ Self::WebGpu
+ }
+ }
+}
+
/// Corresponds to <https://docs.rs/wgpu/latest/wgpu/struct.AdapterInfo.html>
#[derive(Debug, Clone, FromDynamic, ToDynamic)]
pub struct GpuInfo {