Re: motion_notify_event too slow/skips


what i discovered in dealing with this issue is that you must call
gdk_window_get_pointer() as the very last thing to do when processing the
motion callback.  calling it anywhere else in the callback code can cause
backlogs exhibiting the behaviour you describe.

from the manual:

When using the GDK_POINTER_MOTION_HINT_MASK the server will only send a
single GDK_MOTION_NOTIFY event (which is marked as a hint) until the
application asks for more, by calling gdk_window_get_pointer().

can't see the demo code right now, so can't comment specifically on that,
but i found that once i made the get_pointer() routine exist only once and
as last in my motion callback, there were no delays whatsoever, it behaves
as i want and expect.


> When I compile and run the Scribble sample code, the motion_notify_event
> responds slowly, which causes the drawing pen to "skip", even if I remove
> the GDK_POINTER_MOTION_HINT_MASK.  Is there a way to speed up this
> response time, or do I just have to "manually" connect the dots if I'm
> writing a drawing/painting application?  Looking at the behavior of GIMP,
> I'm guessing that I'll need to "manually" connect the dots, but I'd like
> some confirmation on this before implementing the code.
> Thanks,
> Spencer Berry
> ___________________________________________________
> Check-out
> GO get your free GO E-Mail account with expanded storage of 6 MB!
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]