- let mut builder = self.vsystem.window(&wname, width as u32, height as u32);
- let window = if let (Some(xpos), Some(ypos)) = (self.xpos, self.ypos) {
- builder.position(xpos, ypos).build().expect("should be able to set window position")
- } else {
- builder.position_centered().build().expect("should be able to centre window")
- };
+ window.set_title(&wname).expect("set window title");
+ window.set_size(width as u32, height as u32).expect("resize window");
+ window.show();