From c58a8f1a04ba7ff56ec20ac0ad6fe909e3d3cf72 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Fri, 21 Jun 2024 15:37:31 +0200 Subject: [PATCH] linux/x11: Add more debug info to error if opening window fails (#13364) Release Notes: - N/A --- crates/gpui/src/platform/linux/x11/window.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/gpui/src/platform/linux/x11/window.rs b/crates/gpui/src/platform/linux/x11/window.rs index 0d0404bd93cb4b7f7caa58efc64bef25c513b9f2..0043559200a967c4bb3819eb2edb81d4dc7166ba 100644 --- a/crates/gpui/src/platform/linux/x11/window.rs +++ b/crates/gpui/src/platform/linux/x11/window.rs @@ -290,7 +290,10 @@ impl X11WindowState { &win_aux, ) .unwrap() - .check()?; + .check().with_context(|| { + format!("CreateWindow request to X server failed. depth: {}, x_window: {}, visual_set.root: {}, bounds.origin.x.0: {}, bounds.origin.y.0: {}, bounds.size.width.0: {}, bounds.size.height.0: {}", + visual.depth, x_window, visual_set.root, bounds.origin.x.0 + 2, bounds.origin.y.0, bounds.size.width.0, bounds.size.height.0) + })?; let reply = xcb_connection .get_geometry(x_window)