From 2210c9d304304d2eb3193a00f67919c383a41c38 Mon Sep 17 00:00:00 2001 From: Jeremy Wright Date: Tue, 21 Apr 2026 07:39:21 -0400 Subject: [PATCH] Work-around for users running on Wayland in Linux --- run.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/run.py b/run.py index a8bd2baf..fbcd001e 100644 --- a/run.py +++ b/run.py @@ -1,6 +1,11 @@ import sys +import os import faulthandler +# OCP's Xw_Window requires an X11 window ID, so we force XCB so winId() is valid under Wayland/XWayland. +if sys.platform == "linux" and "QT_QPA_PLATFORM" not in os.environ: + os.environ["QT_QPA_PLATFORM"] = "xcb" + # PyInstaller with console=False sets sys.stdout/stderr to None on Windows if sys.stdout is None: sys.stdout = open("nul", "w")