chore: Update smithay
This commit is contained in:
parent
ce74675b0e
commit
54f2d2c67e
7 changed files with 22 additions and 27 deletions
|
|
@ -35,7 +35,7 @@ use smithay::{
|
|||
buffer_dimensions,
|
||||
damage::{Error as RenderError, RenderOutputResult},
|
||||
element::Element,
|
||||
gles::{GlesRenderbuffer, GlesTexture},
|
||||
gles::GlesRenderbuffer,
|
||||
glow::GlowRenderer,
|
||||
multigpu::{gbm::GbmGlesBackend, Error as MultiError, GpuManager},
|
||||
sync::SyncPoint,
|
||||
|
|
@ -79,7 +79,6 @@ use tracing::{error, info, trace, warn};
|
|||
use std::{
|
||||
cell::RefCell,
|
||||
collections::{HashMap, HashSet},
|
||||
ffi::CStr,
|
||||
fmt,
|
||||
path::PathBuf,
|
||||
time::Duration,
|
||||
|
|
@ -278,7 +277,10 @@ pub fn init_backend(
|
|||
error!(?err, "Failed to resume libinput context.");
|
||||
}
|
||||
for device in state.backend.kms().devices.values_mut() {
|
||||
device.drm.activate();
|
||||
if let Err(err) = device.drm.activate(true) {
|
||||
error!(?err, "Failed to resume drm device");
|
||||
}
|
||||
// TODO save state, do the disable part manually, etc
|
||||
if let Some(lease_state) = device.leasing_global.as_mut() {
|
||||
lease_state.resume::<State>();
|
||||
}
|
||||
|
|
@ -421,7 +423,7 @@ impl State {
|
|||
let gbm = GbmDevice::new(fd)
|
||||
.with_context(|| format!("Failed to initialize GBM device for {}", path.display()))?;
|
||||
let (render_node, formats) = {
|
||||
let egl_display = EGLDisplay::new(gbm.clone()).with_context(|| {
|
||||
let egl_display = unsafe { EGLDisplay::new(gbm.clone()) }.with_context(|| {
|
||||
format!("Failed to create EGLDisplay for device: {}", path.display())
|
||||
})?;
|
||||
let egl_device = EGLDevice::device_for_display(&egl_display).with_context(|| {
|
||||
|
|
@ -1175,7 +1177,7 @@ impl Surface {
|
|||
})?;
|
||||
self.fps.elements();
|
||||
|
||||
let res = compositor.render_frame::<_, _, GlesTexture>(
|
||||
let res = compositor.render_frame(
|
||||
&mut renderer,
|
||||
&elements,
|
||||
CLEAR_COLOR, // TODO use a theme neutral color
|
||||
|
|
@ -1184,7 +1186,7 @@ impl Surface {
|
|||
|
||||
match res {
|
||||
Ok(frame_result) => {
|
||||
let feedback = if frame_result.damage.is_some() {
|
||||
let feedback = if !frame_result.is_empty {
|
||||
Some(state.take_presentation_feedback(&self.output, &frame_result.states))
|
||||
} else {
|
||||
None
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ pub fn init_backend(
|
|||
.find(|device| device.try_get_render_node().ok().flatten() == Some(drm_node))
|
||||
.with_context(|| format!("Failed to find EGLDevice for node {}", drm_node))?;
|
||||
// Initialize EGL
|
||||
let egl = EGLDisplay::new(device).with_context(|| "Failed to create EGL display")?;
|
||||
let egl = unsafe { EGLDisplay::new(device) }.with_context(|| "Failed to create EGL display")?;
|
||||
// Create the OpenGL context
|
||||
let context = EGLContext::new(&egl).with_context(|| "Failed to create EGL context")?;
|
||||
// Create a renderer
|
||||
|
|
@ -470,6 +470,7 @@ pub fn init_backend(
|
|||
}
|
||||
}
|
||||
X11Event::Input(event) => state.process_x11_event(event),
|
||||
X11Event::Focus(_) => {} // TODO: release all keys when losing focus and make sure to go through our keyboard filter code
|
||||
})
|
||||
.map_err(|_| anyhow::anyhow!("Failed to insert X11 Backend into event loop"))?;
|
||||
|
||||
|
|
|
|||
|
|
@ -1362,6 +1362,7 @@ impl State {
|
|||
}
|
||||
}
|
||||
InputEvent::Special(_) => {}
|
||||
InputEvent::SwitchToggle { event: _ } => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use crate::state::State;
|
||||
use smithay::delegate_output;
|
||||
use smithay::{delegate_output, wayland::output::OutputHandler};
|
||||
|
||||
impl OutputHandler for State {}
|
||||
|
||||
delegate_output!(State);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue