|
Gentle People:
Special thanks to the folks that wrote the GTK and Cairo Tutorials. They were very helpful.
I am considering an application where I would like to use GTK+-2.0 / Cairo to produce a Cross Hare Cursor, which moves over a graph, which is drawn by Cairo, as you move the mouse in real time.
I have been experimenting with the motion_notify_event and masks shown below: gtk_widget_add_events (window, GDK_MOTION_NOTIFY); gtk_widget_add_events (window, GDK_POINTER_MOTION_MASK ); gtk_widget_add_events (window, GDK_POINTER_MOTION_HINT_MASK ); g_signal_connect(window, "motion_notify_event", G_CALLBACK(Motion_Notify_Function), NULL);
I have easily come up with basic examples that work somewhat for a while, BUT they seem to first hang up (Stop processing motion events and freeze) and then crash with a segfault!!!
It seems like the programs crash because they receive too many motion events too quickly! Is this possible? Is there a motion event queue that could fill up and crash???
To experiment I have changed to an on_expose_event handler to an empty function {} to reduce the workload to the minimum and this did not help!
Am I using the correct approach? Should I be looking at other events and masks? I am concerned that I may be doung this the hard way and that is why I am having trouble.
I can post more example code if necessary.
Should I upgrade my project to GTK3???
Thanks for you help and consideration. Thomas Dineen
|