Re: GtkProgressBar state update issue



Timofei Istomin wrote:
Hello,
I'm developing an embedded application using GTK+ (2.16.6) on the DirectFB
backend.

I use the gtk_progress_bar_set_fraction() to set the progress value, but it
doesn't affect the visible state of the widget until the touchscreen is
tapped.

Other GUI elements (buttons and text entries) are all working, so I presume
that the glib main loop is OK.
The gtk_progress_bar_set_fraction() is called by a separate thread.

I suspect it can be a windowing issue, I don't use any window manager, the
application consists of several fullscreen windows that are switched by
gtk_widget_hide() and _show() functions. Is it correct?

Thanks.
Timofei Istomin.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

You are really asking for trouble doing this! I have wasted sooo much time doing basically what you are doing now, and if I get the time, I might dig up some sources. I've got it working now. Threads and gtk just don't mix very well!
I believe my solution was doing something along the lines of:

if(gtk_main_level() && is_this_the_main_thread())
while(gtk_events_pending()) gtk_main_iteration();


... you need to manually iterate the main loop, but only if you're executing within the context of the ui thread.


N :o)



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