deps: Update smithay

This commit is contained in:
Victoria Brekenfeld 2024-11-18 19:48:17 +01:00 committed by Victoria Brekenfeld
parent dbb51e827d
commit d72bf54628
6 changed files with 37 additions and 18 deletions

2
Cargo.lock generated
View file

@ -4667,7 +4667,7 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]]
name = "smithay"
version = "0.3.0"
source = "git+https://github.com/smithay//smithay?rev=ace2e6a#ace2e6a9197f4b4173dea13d53d280d82f3a99c6"
source = "git+https://github.com/smithay//smithay?rev=bc1d732#bc1d7320f95cdf17f9e7aa6867cccc5903548032"
dependencies = [
"appendlist",
"ash 0.38.0+1.3.281",

View file

@ -119,4 +119,4 @@ inherits = "release"
lto = "fat"
[patch."https://github.com/Smithay/smithay.git"]
smithay = { git = "https://github.com/smithay//smithay", rev = "ace2e6a" }
smithay = { git = "https://github.com/smithay//smithay", rev = "bc1d732" }

View file

@ -67,6 +67,7 @@ use smithay::{
utils::{Buffer as BufferCoords, Clock, Monotonic, Physical, Rectangle, Size, Transform},
wayland::{
dmabuf::{get_dmabuf, DmabufFeedbackBuilder},
presentation::Refresh,
seat::WaylandFocus,
shm::{shm_format_to_fourcc, with_buffer_contents},
},
@ -757,15 +758,24 @@ impl SurfaceThreadState {
)
};
feedback.presented(
clock,
self.output
.current_mode()
.map(|mode| Duration::from_secs_f64(1_000.0 / mode.refresh as f64))
.unwrap_or_default(),
sequence as u64,
flags,
);
let rate = self
.output
.current_mode()
.map(|mode| Duration::from_secs_f64(1_000.0 / mode.refresh as f64));
let refresh = match rate {
Some(rate)
if self
.compositor
.as_ref()
.is_some_and(|comp| comp.vrr_enabled()) =>
{
Refresh::Variable(rate)
}
Some(rate) => Refresh::Fixed(rate),
None => Refresh::Unknown,
};
feedback.presented(clock, refresh, sequence as u64, flags);
self.timings.presented(clock);

View file

@ -29,7 +29,7 @@ use smithay::{
winit::platform::pump_events::PumpStatus,
},
utils::Transform,
wayland::dmabuf::DmabufFeedbackBuilder,
wayland::{dmabuf::DmabufFeedbackBuilder, presentation::Refresh},
};
use std::{borrow::BorrowMut, cell::RefCell, time::Duration};
use tracing::{error, info, warn};
@ -84,8 +84,12 @@ impl WinitState {
state.clock.now(),
self.output
.current_mode()
.map(|mode| Duration::from_secs_f64(1_000.0 / mode.refresh as f64))
.unwrap_or_default(),
.map(|mode| {
Refresh::Fixed(Duration::from_secs_f64(
1_000.0 / mode.refresh as f64,
))
})
.unwrap_or(Refresh::Unknown),
0,
wp_presentation_feedback::Kind::Vsync,
);

View file

@ -36,7 +36,7 @@ use smithay::{
wayland_server::DisplayHandle,
},
utils::{DeviceFd, Transform},
wayland::dmabuf::DmabufFeedbackBuilder,
wayland::{dmabuf::DmabufFeedbackBuilder, presentation::Refresh},
};
use std::{borrow::BorrowMut, cell::RefCell, os::unix::io::OwnedFd, time::Duration};
use tracing::{debug, error, info, warn};
@ -234,8 +234,12 @@ impl Surface {
state.clock.now(),
self.output
.current_mode()
.map(|mode| Duration::from_secs_f64(1_000.0 / mode.refresh as f64))
.unwrap_or_default(),
.map(|mode| {
Refresh::Fixed(Duration::from_secs_f64(
1_000.0 / mode.refresh as f64,
))
})
.unwrap_or(Refresh::Unknown),
0,
wp_presentation_feedback::Kind::Vsync,
)

View file

@ -97,7 +97,8 @@ impl ClientDndGrabHandler for State {
.lock()
.unwrap() = icon.map(|surface| DnDIcon { surface, offset })
}
fn dropped(&mut self, seat: Seat<Self>) {
fn dropped(&mut self, _target: Option<WlSurface>, _validated: bool, seat: Seat<Self>) {
seat.user_data()
.get::<Mutex<Option<DnDIcon>>>()
.unwrap()