diff options
Diffstat (limited to 'gr-wxgui/python/wxgui/stdgui2.py')
-rw-r--r-- | gr-wxgui/python/wxgui/stdgui2.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gr-wxgui/python/wxgui/stdgui2.py b/gr-wxgui/python/wxgui/stdgui2.py index 71436d72c4..b38589988e 100644 --- a/gr-wxgui/python/wxgui/stdgui2.py +++ b/gr-wxgui/python/wxgui/stdgui2.py @@ -21,6 +21,8 @@ '''A simple wx gui for GNU Radio applications''' +import ctypes +import os import wx import sys from gnuradio import gr @@ -33,6 +35,13 @@ class stdapp (wx.App): self.title = title self._nstatus = nstatus self._max_noutput_items = max_noutput_items + # If we're on Linux, also enable multi-threading Xlib access + if os.name == 'posix': + try: + x11 = ctypes.cdll.LoadLibrary('libX11.so') + x11.XInitThreads() + except: + print "Warning: failed to XInitThreads()" # All our initialization must come before calling wx.App.__init__. # OnInit is called from somewhere in the guts of __init__. wx.App.__init__ (self, redirect=False) |