Re: Xlib: unexpected async reply



Hi

Try

gdk_threads_enter()

// do your gdk / gtk calls

// Process pending events of the main loop
while( gtk_events_pending() )
       gtk_main_iteration();

gdk_threads_leave()

If you still get Xlib async errors, there are some more unprotected gtk /
gdk calls or you found a real bug... If you use g_timeout or g_idle you
need to protect gdk / gtk calls too.

HTH

Jan-Marek



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