Rename run_ondemand to run_on_demand
This commit is contained in:
parent
c7cf0cfd83
commit
ee0db52ac4
12 changed files with 25 additions and 24 deletions
|
|
@ -40,7 +40,7 @@ type WaylandDispatcher = calloop::Dispatcher<'static, WaylandSource<WinitState>,
|
|||
|
||||
/// The Wayland event loop.
|
||||
pub struct EventLoop<T: 'static> {
|
||||
/// Has `run` or `run_ondemand` been called or a call to `pump_events` that starts the loop
|
||||
/// Has `run` or `run_on_demand` been called or a call to `pump_events` that starts the loop
|
||||
loop_running: bool,
|
||||
|
||||
buffer_sink: EventSink,
|
||||
|
|
@ -189,7 +189,7 @@ impl<T: 'static> EventLoop<T> {
|
|||
Ok(event_loop)
|
||||
}
|
||||
|
||||
pub fn run_ondemand<F>(&mut self, mut event_handler: F) -> Result<(), EventLoopError>
|
||||
pub fn run_on_demand<F>(&mut self, mut event_handler: F) -> Result<(), EventLoopError>
|
||||
where
|
||||
F: FnMut(Event<T>, &RootEventLoopWindowTarget<T>),
|
||||
{
|
||||
|
|
@ -212,7 +212,7 @@ impl<T: 'static> EventLoop<T> {
|
|||
};
|
||||
|
||||
// Applications aren't allowed to carry windows between separate
|
||||
// `run_ondemand` calls but if they have only just dropped their
|
||||
// `run_on_demand` calls but if they have only just dropped their
|
||||
// windows we need to make sure those last requests are sent to the
|
||||
// compositor.
|
||||
let _ = self.roundtrip().map_err(EventLoopError::Os);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue