window: fix loading the window type initially

This code was lost in the window/window-x11 split.