Use Task chaining to simplify multi_window example
This commit is contained in:
parent
b21e4567dc
commit
88b9384402
4 changed files with 107 additions and 96 deletions
|
|
@ -1030,7 +1030,7 @@ fn run_action<A, C>(
|
|||
}
|
||||
},
|
||||
Action::Window(action) => match action {
|
||||
window::Action::Open(id, settings) => {
|
||||
window::Action::Open(id, settings, channel) => {
|
||||
let monitor = window_manager.last_monitor();
|
||||
|
||||
control_sender
|
||||
|
|
@ -1041,6 +1041,8 @@ fn run_action<A, C>(
|
|||
monitor,
|
||||
})
|
||||
.expect("Send control action");
|
||||
|
||||
let _ = channel.send(id);
|
||||
}
|
||||
window::Action::Close(id) => {
|
||||
let _ = window_manager.remove(id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue