[pygtk] pyGTK on Windows

John K Luebs jkluebs at luebsphoto.com
Wed Feb 4 15:46:53 WST 2004


On Tue, Feb 03, 2004 at 08:33:11PM -0500, Dave Aitel wrote:
> Is there a known bug, possibly related to threading (I just thread 
> enabled by app), that turns the fonts to white on white, in pyGTK 
> (latest python and pyGTK) on Windows XP?

Probably not related to the topic of this thread, but important for
would be multi threaders on Windows. It is almost not possible to
use multiple threads safely with gtk on Windows, even if you lock
properly. Xlib doesn't care about threads, as long as you serialize your
calls properly. Windows is fundamentally different. When you create a
window, the window is married to the thread that called CreateWindow.
This means it is impossible to use gtk/gdk from different threads even
if you lock properly without looking under the gdk hood to see if the
underlying Win32 API calls are "safe". You gotta love Windows. As has
been discussed on the gtk-devel list a solution is to have GDK create a
single thread dedicated to Window creation, and have functions post
thread messages to this thread. This would not be trivial to implement.

--jkl
> 


More information about the pygtk mailing list