Re: am I doing something wrong?




"Bakstein Hynek" <BAKSTEIN@cuckoo.karlov.mff.cuni.cz> writes:

>     I had a little trouble with this list... I posted similar message 
> a week ago just after the relase of .99.8. I need to flush the event 
> queue in GTK. I use this piece of code:
> 
>     while( gtk_events_pending() )
>       gtk_main_iteration();
>       
> it worked fine under .99.7, but in .99.8 and even .99.9 it does not 
> work. It seems, that gtk_events_pending _NEVER_ returns 0. There seem 
> to be some event in the queue, so replacing while(.. ) with while( 
> gtk_events_pending() > 1 ) does not block in the loop, but does not 
> handle events correctly.

Ah, a bug in gtk_events_pending(). It is supposed to report
pending events for high prioriry internal idle callbacks, but
instead it was reporting them for low priority idles.

Thanks for the report,
                                        Owen



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