Skip to content

Commit 7a47d0f

Browse files
authored
Work-around for users running on Wayland in Linux (#575)
1 parent 10ca879 commit 7a47d0f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

run.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import sys
2+
import os
23
import faulthandler
34

5+
# OCP's Xw_Window requires an X11 window ID, so we force XCB so winId() is valid under Wayland/XWayland.
6+
if sys.platform == "linux" and "QT_QPA_PLATFORM" not in os.environ:
7+
os.environ["QT_QPA_PLATFORM"] = "xcb"
8+
49
# PyInstaller with console=False sets sys.stdout/stderr to None on Windows
510
if sys.stdout is None:
611
sys.stdout = open("nul", "w")

0 commit comments

Comments
 (0)