From 5b164bafd00391ee5015378f0d63ecf2d102885e Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 11 Oct 2020 17:17:35 -0700 Subject: [PATCH] wezterm: show config error window if opengl fails to init Previously we'd silently (well, we'd log to stderr) fall back to the CPU renderer. Let's instead pop up a config error window to make this class of error more visible. refs: #272 --- wezterm/src/gui/termwindow.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wezterm/src/gui/termwindow.rs b/wezterm/src/gui/termwindow.rs index bebb5ebf4..e0883c7b9 100644 --- a/wezterm/src/gui/termwindow.rs +++ b/wezterm/src/gui/termwindow.rs @@ -786,7 +786,13 @@ impl WindowCallbacks for TermWindow { } } Err(err) => { - log::error!("OpenGL init failed: {}", err); + crate::connui::show_configuration_error_message(&format!( + "OpenGL initialization failed: {:#}\n + The fallback CPU based renderer is active; performance + will be degraded and the appearance will not be as + good as the OpenGL based renderer", + err + )); } };