GNOME Bugzilla – Bug 705971
Constituents of label-widget of a GtkExpander do not receive events
Last modified: 2014-12-08 04:00:51 UTC
GtkExpander does not allow us to have it's label-widget receive button-press-event (or any event for that matter) on its children. A hack described here: http://gtk.10911.n7.nabble.com/GtkExpander-label-widgets-using-buttons-as-td1738.html , allowed me to make labels clickable inside a GtkExpander. I have to reset the label-widget after the expander has been realized to get the events on the children of label-widget.
My workaround: http://code.google.com/p/quodlibet/source/browse/quodlibet/quodlibet/qltk/queue.py#96
From a quick check, the gtk_widget_map() call in gtk_expander_map() should happen at the end of the function, after the gdk_window_show() there: https://git.gnome.org/browse/gtk+/tree/gtk/gtkexpander.c#n789 This code dates back to the GtkExpander addition, it looks to me like this was done on purpose, the same way buttons-within-buttons are prevented by having the GtkButton's GdkWindow stay over childrens'. This seems sensible for buttons, not as much for expanders. I'll get to making a patch and testing this later today if no one beats me to it.
(In reply to comment #1) > My workaround: > http://code.google.com/p/quodlibet/source/browse/quodlibet/quodlibet/qltk/queue.py#96 really, this one is a better hack. thanks for sharing.
*** This bug has been marked as a duplicate of bug 151537 ***