Remove Compositor window generic

And update `glyphon` and `window_clipboard`
This commit is contained in:
Héctor Ramón Jiménez 2024-01-18 09:55:27 +01:00
parent 7289b6091b
commit 8bf2386972
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
18 changed files with 126 additions and 114 deletions

View file

@ -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,