Remove Compositor window generic
And update `glyphon` and `window_clipboard`
This commit is contained in:
parent
7289b6091b
commit
8bf2386972
18 changed files with 126 additions and 114 deletions
|
|
@ -24,6 +24,7 @@ use crate::{Clipboard, Error, Proxy, Settings};
|
|||
|
||||
use std::collections::HashMap;
|
||||
use std::mem::ManuallyDrop;
|
||||
use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
|
||||
/// An interactive, native, cross-platform, multi-windowed application.
|
||||
|
|
@ -150,9 +151,11 @@ where
|
|||
|
||||
log::info!("Window builder: {:#?}", builder);
|
||||
|
||||
let main_window = builder
|
||||
.build(&event_loop)
|
||||
.map_err(Error::WindowCreationFailed)?;
|
||||
let main_window = Arc::new(
|
||||
builder
|
||||
.build(&event_loop)
|
||||
.map_err(Error::WindowCreationFailed)?,
|
||||
);
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
{
|
||||
|
|
@ -184,7 +187,8 @@ where
|
|||
};
|
||||
}
|
||||
|
||||
let mut compositor = C::new(compositor_settings, Some(&main_window))?;
|
||||
let mut compositor =
|
||||
C::new(compositor_settings, Some(main_window.clone()))?;
|
||||
|
||||
let mut window_manager = WindowManager::new();
|
||||
let _ = window_manager.insert(
|
||||
|
|
@ -388,7 +392,7 @@ async fn run_instance<A, E, C>(
|
|||
} => {
|
||||
let window = window_manager.insert(
|
||||
id,
|
||||
window,
|
||||
Arc::new(window),
|
||||
&application,
|
||||
&mut compositor,
|
||||
exit_on_close_request,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue