Re: [gtk-list] Re: GtkDrawingArea weirdness ...



Sorry, I wasn't explicit.  There are several experiments I did which
show the problem,  The first is that I can completely comment out the
gtk_widget_set_events line and the expose_event still comes through but
the others don't.  The second is that old_mask actually returns a 0 at the
time it is called.  Thus, it *claims* that I won't get any expose events,
yet they come through anyway.

As for which masks to set, why would that be a problem.  If I ask for an
enter_notify_event, I clearly need the GDK_ENTER_NOTIFY_MASK to be set
on the widget.  The gtk_signal_connect function has all the info it
needs to work this out.

Does setting the event mask by hand bother me overly?  No.  I'm used to it
from having to program XLib.  However, from the point of a Gtk newbie,
there's no particular reason not to let Gtk set the mask when I specificaly
request the event.

What *did* bother me was the fact that the behavior was inconsistent.  I
connected up the events and expected everything to fly.  Expose did, but
everything else bombed.  It wasn't immediately obvious that the bug was
a missing event mask.  Since "expose_event" worked, I assumed that the others
should work and that I had screwed up coding elsewhere.  Had "expose_event"
not worked just like the others, I would have assumed a bug in my event
handling/masking rather than my setup code elsewhere.

It also bugs me a bit that I can't see the exposure mask when I ask for
it.  At least if I could see it, I could set/unset it appropriately.

Andy L.



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