[Glade-users] motion notify
Damon Chaplin
damon at karuna.uklinux.net
Sun Jul 24 09:10:15 EDT 2005
On Fri, 2005-07-08 at 01:39 +0200, kappa wrote:
> Hello.
>
> I have image and an event box attached to it.
> I want how to draw over the image with mouse when the
> mouse button is pressed, but when not, I want to do
> something else (ie. display the color which is under the cursor).
>
> My problem is that the motion notify event occurs only
> when I press the mouse button and start to move the cursor over the image.
> When it's unpressed, there is no motion notify generated by GTK.
> I was trying to check other events if they are generated
> while moving cursor, but didn't find any.
Have you set GDK_POINTER_MOTION_HINT_MASK?
If you do that, you need to call gdk_window_get_pointer() each time you
get an event. See:
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Events.html#GdkEventMask
Damon
More information about the Glade-users
mailing list