motion-notify-events (GTK2)



Hello all,

I am having some problems with this widget I am writing.  I would like to get motion notify events as the 
mouse moves so i can redraw that part of my widget, much like the sliders work.  However i only get the 
motion event once every few seconds.  I was wondering if anyone has seen this before in gtk 2.  My motion 
notify event looks like:

static gint gtk_track_motion_notify (GtkWidget *widget, GdkEventMotion *event)
{
    GtkTrack *track;

    g_return_val_if_fail (widget != NULL, FALSE);
    g_return_val_if_fail (GTK_IS_TRACK (widget), FALSE);
    g_return_val_if_fail (event != NULL, FALSE);

    track = GTK_TRACK (widget);
    
    switch (track->moving) {
        case GTKTRACK_LEFT_TRACK_MOVING:
            track->focused_tm->start_sample = (guint)(event->x);
            //gtk_widget_queue_draw(GTK_WIDGET(track));
            break;
        case GTKTRACK_RIGHT_TRACK_MOVING:
            g_printerr("x %f\n", event->x);
            break;
        case GTKTRACK_WHOLE_TRACK_MOVING:
            break;
        case GTKTRACK_MARKER_MOVING:
            break;
        case GTKTRACK_WAVEFILE_MOVING:
            break;
    }
}
off the top of my head i dont know how only that little bit of code could cause such delays if it was in fact 
the only thing being called.

does anyone have any ideas?

Todd





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