Fix orientation of popup menus and all the painting bugs exposed by that.