aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-08-13 12:22:07 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-08-13 12:22:07 +0400
commite02e35f9c61e103a01640d3dc95a894e8855e1c9 (patch)
tree9f8653630d953ec582241bdcff0ad4a33e98c233 /src
parent0acd1d04e175735631e69617cb636b9f12a38489 (diff)
downloadniri-e02e35f9c61e103a01640d3dc95a894e8855e1c9.tar.gz
niri-e02e35f9c61e103a01640d3dc95a894e8855e1c9.tar.bz2
niri-e02e35f9c61e103a01640d3dc95a894e8855e1c9.zip
winit: Bind EGL renderer
Diffstat (limited to 'src')
-rw-r--r--src/winit.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/winit.rs b/src/winit.rs
index 3de74ce4..b9689d08 100644
--- a/src/winit.rs
+++ b/src/winit.rs
@@ -3,6 +3,7 @@ use std::time::Duration;
use smithay::backend::renderer::damage::OutputDamageTracker;
use smithay::backend::renderer::element::surface::WaylandSurfaceRenderElement;
use smithay::backend::renderer::gles::GlesRenderer;
+use smithay::backend::renderer::ImportEgl;
use smithay::backend::winit::{self, WinitError, WinitEvent, WinitEventLoop, WinitGraphicsBackend};
use smithay::output::{Mode, Output, PhysicalProperties, Subpixel};
use smithay::reexports::calloop::timer::{TimeoutAction, Timer};
@@ -100,6 +101,13 @@ impl Winit {
let _global = self.output.create_global::<Niri>(&niri.display_handle);
niri.space.map_output(&self.output, (0, 0));
niri.output = Some(self.output.clone());
+ if let Err(err) = self
+ .backend
+ .renderer()
+ .bind_wl_display(&niri.display_handle)
+ {
+ warn!("error binding renderer wl_display: {err}");
+ }
}
fn dispatch(&mut self, niri: &mut Niri) {