void main(string[] args)
{
   Main.init(args);
   new MyMainWindow();
   Main.run();
}

I would have expected:

   MainWindow mw = new MyMainWindow();
   Main.run(mw);

I presume that the constructor for MainWindow initializes a static variable somewhere for the static function Main.run() to utilize.

Is there any special reason it's done this way, or is it just a convenience thing?