Re: threading problems...please help with workaround
- From: Sven Neumann <sven gimp org>
- To: Brad House <brad mainstreetsoftworks com>
- Cc: gtk-list gnome org
- Subject: Re: threading problems...please help with workaround
- Date: 16 Aug 2001 00:33:10 +0200
Hi,
Brad House <brad mainstreetsoftworks com> writes:
> I posted yesterday, but am no closer to a solution
> with the suggestions I recieved...
>
> here is my improperly functioning code snipet....
>
>
> void *run_thread(void *args)
> {
> int visible=1;
> while (1) {
> sleep(1);
> //GDK_THREADS_ENTER();
> gdk_threads_enter();
> if (visible) {
> visible=0;
> gtk_widget_hide(window);
> } else {
> visible=1;
> gtk_widget_show(window);
> }
> // g_main_iteration(FALSE);
> gdk_threads_leave();
> //GDK_THREADS_LEAVE();
> }
> }
insert a call to gdk_flush() before gdk_threads_leave().
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]