From 012a62d47bcf9cba9e5dd0ec90f2e091e8fdee9e Mon Sep 17 00:00:00 2001 From: Chris McGrath Date: Sat, 9 May 2026 05:20:32 -0400 Subject: [PATCH] Fix CLI crashes on Wayland due to unhandled X11 error in Glasstron (#11264) Co-authored-by: clmcgrath --- app/patches/glasstron+0.1.1.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/patches/glasstron+0.1.1.patch diff --git a/app/patches/glasstron+0.1.1.patch b/app/patches/glasstron+0.1.1.patch new file mode 100644 index 00000000..02746247 --- /dev/null +++ b/app/patches/glasstron+0.1.1.patch @@ -0,0 +1,23 @@ +diff --git a/node_modules/glasstron/src/native/linux_x11/x11.js b/node_modules/glasstron/src/native/linux_x11/x11.js +index e38682a..5a9f214 100644 +--- a/node_modules/glasstron/src/native/linux_x11/x11.js ++++ b/node_modules/glasstron/src/native/linux_x11/x11.js +@@ -58,10 +58,16 @@ class X11Connection { + id = this.display.screen[0].root; + + this.display.client.GetProperty(0, id, prop, 0, 0, 10000000, (err, propData) => { +- if(err) console.error(err); ++ if(err) { ++ console.error(err); ++ return reject(err); ++ } + + this.display.client.GetAtomName(propData.type, (err, typeName) => { +- if(err) console.error(err); ++ if(err) { ++ console.error(err); ++ return reject(err); ++ } + + propData.typeName = typeName; + resolve(propData);