blake82
December 22nd, 2008, 01:10 AM
Hi,
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:
gtk_range_set_value(GTK_RANGE(controller)
unfortunately, the gui only refreshes every two seconds for some reason when I do that. So I've set the function to also call:
Gdk::Window::process_all_updates();
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?
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:
gtk_range_set_value(GTK_RANGE(controller)
unfortunately, the gui only refreshes every two seconds for some reason when I do that. So I've set the function to also call:
Gdk::Window::process_all_updates();
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?