View Full Version : gtk ui update problem

December 22nd, 2008, 01:10 AM

I'm having a frustrating gtk problem

I have an external hardware controller with a bunch of knobs, and I have a gtk gui that I need to reflect the state of the controller.

My problem is with the gui refresh.

whenever there is a change on the controller, it calls:


unfortunately, the gui only refreshes every two seconds for some reason when I do that. So I've set the function to also call:


This works much better, but the gui will regularly hang for a second or two with this method.

I've been trying to find a cause for this *all day long*, but I can't figure it out. I'm fairly new to gtk, so I'm assuming there's probably something simple I'm not doing.

Any ideas?

December 22nd, 2008, 01:16 AM
oh, forgot to mention.

I'm using c++

December 22nd, 2008, 05:59 AM
C++? That first code block looks like C.

Also you didn't add any functions to the "idle" thread did you?

December 23rd, 2008, 12:52 AM
No... not that I know of at least.