Richard Warren wrote:
I'm making a small drawing program with GTK, and I'm having an issue that's also in the "scribble" example tutorial (using this as an example because people would likely know what I'm talking about that way). Anyways, the issue that I'm having is that the program doesn't receive mouse movement events for every pixel that the mouse moves, especially when the mouse moves fast. So my question is, how do I make it receive more mouse movement events, even when the mouse is moving fast, or how can I get around such problems in a way that's smooth unlike just making lines to the last known location of the mouse.When you enable the events you want from your drawing area, are you including the GDK_POINTER_MOTION_HINT_MASK event? I think the scribble example does that, so if you've based it on that you probably are.If so, I believe that might be why you're not getting all the positions. An explanation can be found at:http://developer.gnome.org/doc/API/2.0/gdk/gdk-Events.html#GdkEventMaskLook at the bit about the ...HINT_MASK for details. Then try not using hints, but be aware that your application may lag a bit when the mouse is moved quickly.
I just tried removing "GDK_POINTER_MOTION_HINT_MASK" from the events for the drawing area and is still doesn't do anything different; It still doesn't get all of the pixels in between if the mouse is moving fairly fast.
Thanks, Alex Schultz