Re: Text Entry and GdkCrossingEvents



On 8/28/07, Aaron Geier <ageier catalystmicro com> wrote:
> 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?

Maybe somebody else will have ideas just from your description above,
but for me it would help to have a minimal compilable test case that I
can look at and see what you're talking about.

-- 
jonner



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