mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
winit: Bind EGL renderer
This commit is contained in:
@@ -3,6 +3,7 @@ use std::time::Duration;
|
|||||||
use smithay::backend::renderer::damage::OutputDamageTracker;
|
use smithay::backend::renderer::damage::OutputDamageTracker;
|
||||||
use smithay::backend::renderer::element::surface::WaylandSurfaceRenderElement;
|
use smithay::backend::renderer::element::surface::WaylandSurfaceRenderElement;
|
||||||
use smithay::backend::renderer::gles::GlesRenderer;
|
use smithay::backend::renderer::gles::GlesRenderer;
|
||||||
|
use smithay::backend::renderer::ImportEgl;
|
||||||
use smithay::backend::winit::{self, WinitError, WinitEvent, WinitEventLoop, WinitGraphicsBackend};
|
use smithay::backend::winit::{self, WinitError, WinitEvent, WinitEventLoop, WinitGraphicsBackend};
|
||||||
use smithay::output::{Mode, Output, PhysicalProperties, Subpixel};
|
use smithay::output::{Mode, Output, PhysicalProperties, Subpixel};
|
||||||
use smithay::reexports::calloop::timer::{TimeoutAction, Timer};
|
use smithay::reexports::calloop::timer::{TimeoutAction, Timer};
|
||||||
@@ -100,6 +101,13 @@ impl Winit {
|
|||||||
let _global = self.output.create_global::<Niri>(&niri.display_handle);
|
let _global = self.output.create_global::<Niri>(&niri.display_handle);
|
||||||
niri.space.map_output(&self.output, (0, 0));
|
niri.space.map_output(&self.output, (0, 0));
|
||||||
niri.output = Some(self.output.clone());
|
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) {
|
fn dispatch(&mut self, niri: &mut Niri) {
|
||||||
|
|||||||
Reference in New Issue
Block a user