mono/xwt — pull request #381 by sevoku (2014-08-14 17:39:45+00:00)
Title: [Gtk] fix evt handling for widgets with own window

Some Gtk Widgets have own Gdk.Windows. Most of the events are not raised for such widgets, because WidgetBackend (and its derivates) automatically put them into an EventBox and subscribe its events, instead of using the widgets directly.

This PR allows Gtk backends to overide EventBox allocation and handle events directly for widgets which have a Gdk.Window already. This is achieved though the WidgetBackend.NeedsEventBox property, which is true by default (keeps original behavior). Backends can set it to false during their initialization and force the base class WidgetBackend to subscribe the events from the widgets directly.

I've tested almost all widgets (but not all events, only Mouse events) and added the override to widgets, that did not work previously. Maybe some other backends should use the override, too.