Skip to content

Commit

Permalink
#4393 don't try to capture stderr in GUI mode
Browse files Browse the repository at this point in the history
this type of process doesn't have a console
  • Loading branch information
totaam committed Oct 29, 2024
1 parent 0539fa6 commit adc0487
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xpra/platform/win32/gl_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit adc0487

Please sign in to comment.