centralize window creation

Signed-off-by: Tomas Neme <lacrymology@gmail.com>