gtk_events_pending() is pending!!



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

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