Re: Problem with GUI not (always) updating...



Michael L Torrie schrieb:
This is classic behavior when you use threads in GTK without following
the instructions for using GTK in a threaded way.
Does your thread interact with the gui at all?  Are you following the
documentation for setting up GDK threading and locking any calls to gtk
from your thread?  If you are calling gtk calls from your thread for the
purpose of updating the gui, consider calling the thread-safe g_idle_add
call from your thread and then having a callback (which would run in the
main GUI thread) do any gui calls for you.

Actually, I am only updating the GUI right before I send the worker threads to sleep, mainly to save CPU time for the computation. I've been trying to fix this behavior with a pthread mutex that locks on GUI access but after reading the FAQ I think this only made it worse.

Thanks for the heads-up and sorry for asking FAQ-material.

Matthias Scheer

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



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