Text Entry and GdkCrossingEvents



Hello,

I’ve created a custom class that uses the Gtk::Entry widget.

In this custom class, I’ve overridden the on_enter_notify event.  I have used the set_events() command in the constructor using only the Gdk entry notify mask as a parameter.

A problem that I’m having is that this event call back is getting called multiple times when I cross my mouse over the widget, even though I only enter the widget once.  For what I’m trying to do, this should only happen once when I enter the widget.

 

I’ve noticed two things:

 

1)       I’ve tried using the set_has_frame(true) [which is the default], and the event callback is called when my mouse touches the frame, and then again when my mouse goes over the “text box” and my cursor changes from a pointer to a “text-edit” cursor.  The event callback is called a total of two times.

2)       I’ve tried using the set_has_frame(false), and the event callback is called 3 times.  As soon as my mouse touches the widget, it immediately is changed to the “text-edit” cursor, and the callback is called 3 times.

 

Does anyone know why this callback is being called multiple times, even though the mouse only enters the widget once?

Thanks in advance,
Aaron Geier



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