WIP - Make poll_events and run_forever take &mut self
This removes the need for the EventsLoop::interrupt method by inroducing a ControlFlow type. This new type is to be returned by the user's callback and indicates whether the `EventsLoop` should continue waiting for events or break from the loop. Only the wayland, x11 and api_transition backends have been updated so far, and only the wayland backend has actually been tested.
This commit is contained in:
parent
38856b1c60
commit
f2dd2f0752
7 changed files with 103 additions and 95 deletions
|
|
@ -110,7 +110,7 @@ impl WindowBuilder {
|
|||
}
|
||||
|
||||
// building
|
||||
let w = try!(platform::Window2::new(events_loop.events_loop.clone(), &self.window, &self.platform_specific));
|
||||
let w = try!(platform::Window2::new(&events_loop.events_loop, &self.window, &self.platform_specific));
|
||||
|
||||
Ok(Window { window: w })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue