Implement ApplicationHandler::can_create|destroy_surfaces() (#3765)
This commit is contained in:
parent
a0d69c782a
commit
75ce71f05a
21 changed files with 178 additions and 114 deletions
|
|
@ -301,10 +301,10 @@ impl EventLoop {
|
|||
|
||||
app.new_events(&self.window_target, cause);
|
||||
|
||||
// NB: For consistency all platforms must emit a 'resumed' event even though Wayland
|
||||
// applications don't themselves have a formal suspend/resume lifecycle.
|
||||
// NB: For consistency all platforms must call `can_create_surfaces` even though Wayland
|
||||
// applications don't themselves have a formal surface destroy/create lifecycle.
|
||||
if cause == StartCause::Init {
|
||||
app.resumed(&self.window_target);
|
||||
app.can_create_surfaces(&self.window_target);
|
||||
}
|
||||
|
||||
// Indicate user wake up.
|
||||
|
|
|
|||
|
|
@ -505,10 +505,10 @@ impl EventLoop {
|
|||
fn single_iteration<A: ApplicationHandler>(&mut self, app: &mut A, cause: StartCause) {
|
||||
app.new_events(&self.event_processor.target, cause);
|
||||
|
||||
// NB: For consistency all platforms must emit a 'resumed' event even though X11
|
||||
// applications don't themselves have a formal suspend/resume lifecycle.
|
||||
// NB: For consistency all platforms must call `can_create_surfaces` even though X11
|
||||
// applications don't themselves have a formal surface destroy/create lifecycle.
|
||||
if cause == StartCause::Init {
|
||||
app.resumed(&self.event_processor.target)
|
||||
app.can_create_surfaces(&self.event_processor.target)
|
||||
}
|
||||
|
||||
// Process all pending events
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue