Re: Multi-threaded GTK+



Tor Lillqvist <tml iki fi> writes:

>  > Maybe a simple:
>  > 
>  >   GDK_THREADS_ENTER ();
>  >   real_window_procedure(...);
>  >   GDK_THREADS_LEAVE ();
>  > 
>  > in _gdk_win32_window_procedure() would help a lot ?
> 
> I don't think so, as one basic issue is that Windows has a per-thread
> message queue, while GDK-Win32 only does PeekMessage() and
> MsgWaitForMultipleObjects() in one (the "main") thread. These calls
> only notice messages destined for their own thread. Thus, if some
> other thread creates a window, messages for it will never be read (and
> converted into GDK events). I assume.

So, what about

        g_idle_add (VERY_HIGH_PRIORITY, do_window_procedure());
        g_main_iteration();

?

Søren



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]