On Wednesday, 22 May 2019 at 22:33:52 UTC, Alex wrote:
>     auto x = (GdkEventButton* e, Widget w) ...
>     X.addOnButtonPress(x);
>
> Why is x not a delegate?
Because you didn't ask for one and it didn't have to be.
Just add the delegate keyword to ask for one:
auto x = delegate(GdkEventButton* e, Widget w) {};
          ^^^^^^^^