GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Aug 30, 2016 1:15 am

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: GTK+-2.0 Question On GDK_POINTER_MOTION
PostPosted: Fri Jan 18, 2013 2:17 am 

Joined: Wed Jan 16, 2013 11:50 pm
Posts: 4
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

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

I can post more example code if necessary.

Should I upgrade my project to GTK3???

Thanks for you help and consideration.
Thomas Dineen

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group