Re: gtk_events_pending() is pending!!
- From: "Richard Boaz" <riboaz xs4all nl>
- To: "s88" <dave tw gmail com>
- Cc: gtk-list gnome org
- Subject: Re: gtk_events_pending() is pending!!
- Date: Sat, 24 Mar 2007 07:05:53 +0100 (CET)
but you haven't entered the main loop yet. how can you process the events
off a queue that isn't being processed?
i don't think you should call this before you've entered the main loop; it
strikes me that a hang is exactly what you should expect.
and, you should use this call as little as possible. most of the time,
requiring this to be called is more a reflection of improper design than
actual necessity.
richard
> Hi all:
> I'am trying to add the
> 1742 while(gtk_events_pending())
> 1743 {
> 1744 gtk_main_iteration();
> 1745 }
> 1746 }
> into my gtk project to make my program runs smoothly.
> but, once I add the above code in my main function. The while loop always
> busy and block all of the widgets.
> for example, I add the pending check code before the end of the main...
> 304
> 305 while (gtk_events_pending()) gtk_main_iteration();
> 306 gdk_threads_enter();
>
> 307 GUI_data_mutex = g_mutex_new ();
> 308 GUI_data_cond = g_cond_new ();
> 309 waiting_share(key);
> 310 gtk_main ();
> 311 gdk_threads_leave();
> 312
> 313
> 314 return 0;
> 315
> 316 }
>
> It looks like some events are pending. How could I do? and How should I
> know
> which event is pending?
>
> Thanks!!!
>
> Dave.
>
>
>
> --
> System on Chip Design Lab.
> Dept. of Computer Science and Information Engineering,
> National Chung Cheng University
> E-mail : s88 tw acm org
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]