On Wed, May 15, 2002 at 09:37:06AM -0700, John Finlay wrote:
> 
>  > In theory, you could check which events a widget receives by default with
>  >  get_events() - note that it is a bitmap and you would have to decode
>  >  it according to the GTK.py _MASK constants. However, this seems to
>  >  return 0 for any newly-realized widget. Why?
>  >
>  >
> get_events() reports the same for me though if I set an event mask
> get_events() reports it. I also notice that windows seem to ignore the
> event masks i.e. they get button press and release events without doing
> a set_events() or add_events().

Thanks for the list (added question 3.5). Well, get_events() reports 0
when the widget has just been realized, and after we fiddle using
set/add_events, it returns the bitmask used in that calls, so it's
pretty useless to me.

GtkWindow has some default masks selected (saw my gtkwindow.c example in
the other message) which is why it gets them automatically. Why
GtkEventBox doesn't get key_press_events, even with a proper mask,
however, is a mystery - GtkWindow seems to eat them up!

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to