diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-03 13:04:32 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-03 13:04:32 +0400 |
| commit | 5a707c879ba9b21665d2207020fe354040b807b2 (patch) | |
| tree | 5bdc370a4b3068b0878d3d85acfbd25bf23a3952 /src/niri.rs | |
| parent | 3bd5a012cbf15bd294e1a6290914a6e687cbcf2d (diff) | |
| download | niri-5a707c879ba9b21665d2207020fe354040b807b2.tar.gz niri-5a707c879ba9b21665d2207020fe354040b807b2.tar.bz2 niri-5a707c879ba9b21665d2207020fe354040b807b2.zip | |
Replace Backend trait with enum
Diffstat (limited to 'src/niri.rs')
| -rw-r--r-- | src/niri.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/niri.rs b/src/niri.rs index 1a00915a..1a5f990a 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -512,12 +512,7 @@ impl Niri { // Timer::immediate() adds a millisecond of delay for some reason. // This should be fixed in calloop v0.11: https://github.com/Smithay/calloop/issues/142 let idle = self.event_loop.insert_idle(move |data| { - let backend: &mut dyn Backend = if let Some(tty) = &mut data.tty { - tty - } else { - data.winit.as_mut().unwrap() - }; - data.niri.redraw(backend, &output); + data.niri.redraw(&mut data.backend, &output); }); state.queued_redraw = Some(idle); } @@ -655,7 +650,7 @@ impl Niri { elements } - fn redraw(&mut self, backend: &mut dyn Backend, output: &Output) { + fn redraw(&mut self, backend: &mut Backend, output: &Output) { let _span = tracy_client::span!("Niri::redraw"); let state = self.output_state.get_mut(output).unwrap(); |
