Motion Notify Event



I'm trying to set up a motion notify event for a glarea widget - I have
to use GTK-1.2  and glarea due to constraints beyond my control.

I want a function to be called whenever the mouse moves over the glarea.
I've done the following:

gtk_widget_set_events(GTK_WIDGET(widget), GDK_MOTION_NOTIFY);
gtk_signal_connect(GTK_OBJECT(widget), "motion_notify_event",
            GTK_SIGNAL_FUNC(motion), NULL);

where widget is (obviously) the glarea. The function only seems to be
called when the mouse moves into the window, or just after a mouse
button is pressed.

What do I need to do to get the function called whenever the mouse moves
over the widget? (I'm checking it's being called with a printf)

-- 
Ed.

Of course power tools and alcohol don't mix.  Everyone knows power
tools aren't soluble in alcohol



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