GDK_POINTER_MOTION_HINT_MASK and buttons



I'm trying to capture pointer movement within a button; I want to move the
button around on-screen with the mouse.  The problem is, my motion
callback is only called when the pointer leaves the button, so the button
kind of jerks around as it moves, and fine-tuning button placement is
kinda difficult.

Is this by design?  If so, how can I get around this?  I've tried placing
an event box above, below, and within the button-- this doesn't seem to
help.  (Placing the event box above the button just obscured the button.)

I know this is probably not the right forum (as most of the traffic is
dedicated to GTK+ development, and not development with GTK+), but I'm not
sure who else to ask.  I've dug through the source, and I think I'm
getting to be a better programmer for it-- however, the only way I can see
to properly fix this is to patch GTK itself.  And I don't know if I'm
ready for that.

Anyway, thanks for you help.

								- Tony
PS:

I capture the motion signal like this:
================================================
      gtk_widget_set_events (button,
			     GDK_ENTER_NOTIFY_MASK |
			     GDK_LEAVE_NOTIFY_MASK |
			     GDK_MOTION_NOTIFY |
			     GDK_POINTER_MOTION_HINT_MASK |
			     GDK_BUTTON_PRESS_MASK);
      gtk_signal_connect (GTK_OBJECT (button),
			  "motion_notify_event",
			  (GtkSignalFunc) z_widget_move,
			  NULL);
================================================




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