Add allow_automatic_tabbing task to runtime::window
Co-authored-by: Karolis Ramanauskas <karolisr@gmail.com>
This commit is contained in:
parent
c1acd8cdda
commit
aef64e56b8
2 changed files with 35 additions and 5 deletions
|
|
@ -435,6 +435,16 @@ where
|
|||
self.error = Some(error);
|
||||
event_loop.exit();
|
||||
}
|
||||
Control::SetAutomaticWindowTabbing(_enabled) => {
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
use winit::platform::macos::ActiveEventLoopExtMacOS;
|
||||
event_loop
|
||||
.set_allows_automatic_window_tabbing(
|
||||
_enabled,
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
break;
|
||||
|
|
@ -492,6 +502,7 @@ enum Control {
|
|||
on_open: oneshot::Sender<window::Id>,
|
||||
scale_factor: f32,
|
||||
},
|
||||
SetAutomaticWindowTabbing(bool),
|
||||
}
|
||||
|
||||
async fn run_instance<P>(
|
||||
|
|
@ -1657,6 +1668,11 @@ fn run_action<'a, P, C>(
|
|||
let _ = channel.send(size);
|
||||
}
|
||||
}
|
||||
window::Action::SetAllowAutomaticTabbing(enabled) => {
|
||||
control_sender
|
||||
.start_send(Control::SetAutomaticWindowTabbing(enabled))
|
||||
.expect("Send control action");
|
||||
}
|
||||
window::Action::RedrawAll => {
|
||||
for (_id, window) in window_manager.iter_mut() {
|
||||
window.raw.request_redraw();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue