GtkDrawingArea and pointer motion events
- From: Celso Pinto <cpinto yimports com>
- To: gtk-app-devel-list gnome org
- Subject: GtkDrawingArea and pointer motion events
- Date: Tue, 17 Jan 2006 01:20:31 +0000
Hi everyone,
I'm following the GTK tutorial and I'm trying to tweak the painting on
the Scribble example so that I can use it on a Maemo application, and
I'm having some problems with pointer motion events.
By this I mean that no matter what I tweak, there are always huge gaps
between black pixels if I move the mouse pointer quickly.
I've removed the GDK_POINTER_MOTION_HINT_MASK and instead of invoking
the gtk_widget_queue_draw_area function I'm using the gtk_widget_draw.
I've also timed the pointer_motion_event callback and the function
(including drawing to the backing pixmap) usually doesn't take more than
5 millisecs (as hinted in the documentation as being safe when not using
the hint mask so the events don't lag) and I'm still getting gaps.
I have thought of using the gdk_event_get method in the
pointer_motion_event callback as to queue all motion events and then
pass a list of coordinates to the drawing function but I'm not so sure
of this because:
1) I don't think all events queued in the loop are motion events, and if
an event isn't a motion event then there's no simple way to put it at
the end of the queue to be processed later;
2) the documentation doesn't say if the gdk_event_get de-queues the
event. By this I mean that I'm not sure if the event won't be processed
twice.
Has anyone faced this kind of problems before?
Cheers,
Celso
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]