Skip to content

Instantly share code, notes, and snippets.

@LPGhatguy
Created June 3, 2017 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LPGhatguy/8d12e3a9e0fad838a881f200e3687c6c to your computer and use it in GitHub Desktop.
Save LPGhatguy/8d12e3a9e0fad838a881f200e3687c6c to your computer and use it in GitHub Desktop.
Start program, attempt to move window, observe that window resizes
extern crate winit;
fn main() {
let events_loop = winit::EventsLoop::new();
let window = winit::WindowBuilder::new()
.with_dimensions(200, 200)
.with_max_dimensions(200, 200)
.build(&events_loop)
.unwrap();
events_loop.run_forever(|event| {
match event {
winit::Event::WindowEvent { event: winit::WindowEvent::Closed, .. } => {
events_loop.interrupt();
},
_ => ()
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment