Provide a Display handle to graphics::Compositor

This commit is contained in:
Nico Just 2025-10-23 15:19:45 +02:00 committed by Héctor Ramón Jiménez
parent b9eeb34a12
commit 8374c6baa8
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
5 changed files with 51 additions and 24 deletions

View file

@ -264,9 +264,10 @@ where
type Renderer = Renderer<A::Renderer, B::Renderer>;
type Surface = Surface<A::Surface, B::Surface>;
async fn with_backend<W: compositor::Window + Clone>(
async fn with_backend(
settings: graphics::Settings,
compatible_window: W,
display: impl compositor::Display + Clone,
compatible_window: impl compositor::Window + Clone,
shell: Shell,
backend: Option<&str>,
) -> Result<Self, graphics::Error> {
@ -296,6 +297,7 @@ where
for backend in candidates.iter().map(Option::as_deref) {
match A::with_backend(
settings,
display.clone(),
compatible_window.clone(),
shell.clone(),
backend,
@ -310,6 +312,7 @@ where
match B::with_backend(
settings,
display.clone(),
compatible_window.clone(),
shell.clone(),
backend,