Re: motion_notify_event too slow/skips



hi,

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:
(http://www.gtk.org/api/2.6/gdk/gdk-Events.html#GdkEventMask)

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.

cheers,
richard


> 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.com
> GO get your free GO E-Mail account with expanded storage of 6 MB!
> http://mail.go.com
>
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>





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