Re: Button clicks trigger leave-notify events! Why?



>I got interested in tracking the mouse as it moves over a drawing
>area.  Imagine my surprise when I found that clicking the mouse button
>generates a leave-notify event!  Nothing in the manual prepared me for
>this: the GDK reference just says "GDK_LEAVE_NOTIFY the pointer has
>left the window".  What is the rationale for this behaviour (if it is
>not a bug)?  Should I think of the pointer as leaving the desktop for
>the duration of a drag?  What should I do if I need to track the
>pointer while the button is pressed?

stop using gtk_widget_set_events, and use gtk_widget_add_events with
the masks for button press, button release and pointer motion.

--p



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