From adc0487184923a7f08d3623b4ba2eb50feeb5276 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 29 Oct 2024 15:37:05 +0700 Subject: [PATCH] #4393 don't try to capture stderr in GUI mode this type of process doesn't have a console --- xpra/platform/win32/gl_context.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xpra/platform/win32/gl_context.py b/xpra/platform/win32/gl_context.py index 5c259090a1..b67e57e90e 100644 --- a/xpra/platform/win32/gl_context.py +++ b/xpra/platform/win32/gl_context.py @@ -10,6 +10,7 @@ from xpra.opengl.check import check_PyOpenGL_support from xpra.util.io import CaptureStdErr +from xpra.platform.win32 import is_terminal from xpra.platform.win32.gui import get_window_handle from xpra.platform.win32.constants import ( CS_OWNDC, CS_HREDRAW, CS_VREDRAW, COLOR_WINDOW, @@ -87,7 +88,7 @@ def __repr__(self): def get_gl_context_manager() -> AbstractContextManager: # capture stderr only the first time this is called global gl_init_done - if not gl_init_done: + if not gl_init_done and is_terminal(): gl_init_done = True return CaptureStdErr() cm = nullcontext()