From d4743183d40c6044ce6fa39e2a52919a32912cda Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 19 May 2020 14:23:28 +0200 Subject: Draft first working version of `iced_glow` :tada: --- winit/src/application.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'winit/src') diff --git a/winit/src/application.rs b/winit/src/application.rs index f6bc8fcc..4bc36586 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -78,7 +78,11 @@ pub trait Application: Sized { /// [`update`](#tymethod.update). /// /// A `Subscription` will be kept alive as long as you keep returning it! - fn subscription(&self) -> Subscription; + /// + /// By default, it returns an empty subscription. + fn subscription(&self) -> Subscription { + Subscription::none() + } /// Returns the widgets to display in the [`Application`]. /// @@ -177,9 +181,10 @@ pub trait Application: Sized { let mut resized = false; let clipboard = Clipboard::new(&window); - let (mut backend, mut renderer) = Self::Backend::new(backend_settings); + let mut backend = Self::Backend::new(backend_settings.clone()); let surface = backend.create_surface(&window); + let mut renderer = backend.create_renderer(backend_settings); let mut swap_chain = { let physical_size = size.physical(); -- cgit