forge
Explore
Log in

Don't you dare go Hollow

winit: Bind EGL renderer

Browse files at this commit

e02e35f9c61e103a01640d3dc95a894e8855e1c9Ivan MolodetskikhParent: 0acd1d0
src/winit.rsmodified+8 -0
@@ -3,6 +3,7 @@ use std::time::Duration;
3 use smithay::backend::renderer::damage::OutputDamageTracker;3 use smithay::backend::renderer::damage::OutputDamageTracker;
4 use smithay::backend::renderer::element::surface::WaylandSurfaceRenderElement;4 use smithay::backend::renderer::element::surface::WaylandSurfaceRenderElement;
5 use smithay::backend::renderer::gles::GlesRenderer;5 use smithay::backend::renderer::gles::GlesRenderer;
6+use smithay::backend::renderer::ImportEgl;
6 use smithay::backend::winit::{self, WinitError, WinitEvent, WinitEventLoop, WinitGraphicsBackend};7 use smithay::backend::winit::{self, WinitError, WinitEvent, WinitEventLoop, WinitGraphicsBackend};
7 use smithay::output::{Mode, Output, PhysicalProperties, Subpixel};8 use smithay::output::{Mode, Output, PhysicalProperties, Subpixel};
8 use smithay::reexports::calloop::timer::{TimeoutAction, Timer};9 use smithay::reexports::calloop::timer::{TimeoutAction, Timer};
@@ -100,6 +101,13 @@ impl Winit {
100 let _global = self.output.create_global::<Niri>(&niri.display_handle);101 let _global = self.output.create_global::<Niri>(&niri.display_handle);
101 niri.space.map_output(&self.output, (0, 0));102 niri.space.map_output(&self.output, (0, 0));
102 niri.output = Some(self.output.clone());103 niri.output = Some(self.output.clone());
104+ if let Err(err) = self
105+ .backend
106+ .renderer()
107+ .bind_wl_display(&niri.display_handle)
108+ {
109+ warn!("error binding renderer wl_display: {err}");
110+ }
103 }111 }
104 112
105 fn dispatch(&mut self, niri: &mut Niri) {113 fn dispatch(&mut self, niri: &mut Niri) {