From 01ce9cf0aa1354f7316f70bb7e22606b5917887d Mon Sep 17 00:00:00 2001 From: Ottatop Date: Fri, 8 Sep 2023 20:46:01 -0500 Subject: [PATCH] Bump dependencies --- Cargo.toml | 12 +++---- src/backend/udev.rs | 25 ++++---------- src/backend/winit.rs | 4 ++- src/focus.rs | 72 +++++++++++++++++++++++++++++++++++++++++ src/grab/move_grab.rs | 72 +++++++++++++++++++++++++++++++++++++++++ src/grab/resize_grab.rs | 72 +++++++++++++++++++++++++++++++++++++++++ src/window.rs | 72 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 304 insertions(+), 25 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5e4b8c6..4f6a041 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,12 +14,12 @@ keywords = ["wayland", "compositor", "smithay", "lua"] [dependencies] tracing = "0.1.37" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } -smithay = { git = "https://github.com/Smithay/smithay", rev = "ae7fb22", features = ["desktop", "wayland_frontend"] } +smithay = { git = "https://github.com/Smithay/smithay", rev = "1a61e1c", features = ["desktop", "wayland_frontend"] } smithay-drm-extras = { git = "https://github.com/Smithay/smithay", optional = true } -thiserror = "1.0.44" +thiserror = "1.0.48" xcursor = { version = "0.3.4", optional = true } -image = { version = "0.24.6", default-features = false, optional = true } -serde = { version = "1.0.174", features = ["derive"] } +image = { version = "0.24.7", default-features = false, optional = true } +serde = { version = "1.0.188", features = ["derive"] } rmp = { version = "0.8.12" } rmp-serde = { version = "1.1.2" } calloop = { version = "0.10.1", features = ["executor", "futures-io"] } @@ -28,8 +28,8 @@ async-process = { version = "1.7.0" } itertools = { version = "0.11.0" } x11rb = { version = "0.12.0", default-features = false, features = ["composite"], optional = true } shellexpand = "3.1.0" -toml = "0.7.6" -anyhow = { version = "1.0.74", features = ["backtrace"] } +toml = "0.7.7" +anyhow = { version = "1.0.75", features = ["backtrace"] } clap = { version = "4.4.2", features = ["derive"] } [features] diff --git a/src/backend/udev.rs b/src/backend/udev.rs index 2d79177..26fed9a 100644 --- a/src/backend/udev.rs +++ b/src/backend/udev.rs @@ -487,20 +487,15 @@ fn get_surface_dmabuf_feedback( .collect::>(); let surface = composition.surface(); - let planes = surface.planes().unwrap(); + let planes = surface.planes().clone(); // We limit the scan-out trache to formats we can also render from // so that there is always a fallback render path available in case // the supplied buffer can not be scanned out directly - let planes_formats = surface - .supported_formats(planes.primary.handle) - .unwrap() + let planes_formats = planes + .primary + .formats .into_iter() - .chain( - planes - .overlay - .iter() - .flat_map(|p| surface.supported_formats(p.handle).unwrap()), - ) + .chain(planes.overlay.into_iter().flat_map(|p| p.formats)) .collect::>() .intersection(&all_render_formats) .copied() @@ -886,13 +881,7 @@ impl State { } }; - let mut planes = match surface.planes() { - Ok(planes) => planes, - Err(err) => { - tracing::warn!("Failed to query surface planes: {}", err); - return; - } - }; + let mut planes = surface.planes().clone(); // Using an overlay plane on a nvidia card breaks if driver @@ -1148,7 +1137,7 @@ impl State { clock, output .current_mode() - .map(|mode| mode.refresh as u32) + .map(|mode| Duration::from_secs_f64(1000f64 / mode.refresh as f64)) .unwrap_or_default(), seq as u64, flags, diff --git a/src/backend/winit.rs b/src/backend/winit.rs index 6218a35..0d4c09d 100644 --- a/src/backend/winit.rs +++ b/src/backend/winit.rs @@ -321,7 +321,9 @@ pub fn run_winit() -> anyhow::Result<()> { time, output .current_mode() - .map(|mode| mode.refresh as u32) + .map(|mode| { + Duration::from_secs_f64(1000f64 / mode.refresh as f64) + }) .unwrap_or_default(), 0, wp_presentation_feedback::Kind::Vsync, diff --git a/src/focus.rs b/src/focus.rs index 0464958..b9acdbf 100644 --- a/src/focus.rs +++ b/src/focus.rs @@ -167,6 +167,78 @@ impl PointerTarget for FocusTarget { FocusTarget::LayerSurface(surf) => PointerTarget::leave(surf, seat, data, serial, time), } } + + fn gesture_swipe_begin( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GestureSwipeBeginEvent, + ) { + todo!() + } + + fn gesture_swipe_update( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GestureSwipeUpdateEvent, + ) { + todo!() + } + + fn gesture_swipe_end( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GestureSwipeEndEvent, + ) { + todo!() + } + + fn gesture_pinch_begin( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GesturePinchBeginEvent, + ) { + todo!() + } + + fn gesture_pinch_update( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GesturePinchUpdateEvent, + ) { + todo!() + } + + fn gesture_pinch_end( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GesturePinchEndEvent, + ) { + todo!() + } + + fn gesture_hold_begin( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GestureHoldBeginEvent, + ) { + todo!() + } + + fn gesture_hold_end( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GestureHoldEndEvent, + ) { + todo!() + } } impl KeyboardTarget for FocusTarget { diff --git a/src/grab/move_grab.rs b/src/grab/move_grab.rs index 279706e..d42b92c 100644 --- a/src/grab/move_grab.rs +++ b/src/grab/move_grab.rs @@ -166,6 +166,78 @@ impl PointerGrab for MoveSurfaceGrab { fn start_data(&self) -> &GrabStartData { &self.start_data } + + fn gesture_swipe_begin( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GestureSwipeBeginEvent, + ) { + todo!() + } + + fn gesture_swipe_update( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GestureSwipeUpdateEvent, + ) { + todo!() + } + + fn gesture_swipe_end( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GestureSwipeEndEvent, + ) { + todo!() + } + + fn gesture_pinch_begin( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GesturePinchBeginEvent, + ) { + todo!() + } + + fn gesture_pinch_update( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GesturePinchUpdateEvent, + ) { + todo!() + } + + fn gesture_pinch_end( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GesturePinchEndEvent, + ) { + todo!() + } + + fn gesture_hold_begin( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GestureHoldBeginEvent, + ) { + todo!() + } + + fn gesture_hold_end( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GestureHoldEndEvent, + ) { + todo!() + } } pub fn move_request_client( diff --git a/src/grab/resize_grab.rs b/src/grab/resize_grab.rs index 5e800da..c96509c 100644 --- a/src/grab/resize_grab.rs +++ b/src/grab/resize_grab.rs @@ -245,6 +245,78 @@ impl PointerGrab for ResizeSurfaceGrab { fn start_data(&self) -> &GrabStartData { &self.start_data } + + fn gesture_swipe_begin( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GestureSwipeBeginEvent, + ) { + todo!() + } + + fn gesture_swipe_update( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GestureSwipeUpdateEvent, + ) { + todo!() + } + + fn gesture_swipe_end( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GestureSwipeEndEvent, + ) { + todo!() + } + + fn gesture_pinch_begin( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GesturePinchBeginEvent, + ) { + todo!() + } + + fn gesture_pinch_update( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GesturePinchUpdateEvent, + ) { + todo!() + } + + fn gesture_pinch_end( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GesturePinchEndEvent, + ) { + todo!() + } + + fn gesture_hold_begin( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GestureHoldBeginEvent, + ) { + todo!() + } + + fn gesture_hold_end( + &mut self, + _data: &mut State, + _handle: &mut PointerInnerHandle<'_, State>, + _event: &smithay::input::pointer::GestureHoldEndEvent, + ) { + todo!() + } } #[derive(Default, Debug, Clone, Copy, Eq, PartialEq)] diff --git a/src/window.rs b/src/window.rs index 394ef2a..41a4ffa 100644 --- a/src/window.rs +++ b/src/window.rs @@ -369,6 +369,78 @@ impl PointerTarget for WindowElement { WindowElement::X11(surface) => PointerTarget::leave(surface, seat, data, serial, time), } } + + fn gesture_swipe_begin( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GestureSwipeBeginEvent, + ) { + todo!() + } + + fn gesture_swipe_update( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GestureSwipeUpdateEvent, + ) { + todo!() + } + + fn gesture_swipe_end( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GestureSwipeEndEvent, + ) { + todo!() + } + + fn gesture_pinch_begin( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GesturePinchBeginEvent, + ) { + todo!() + } + + fn gesture_pinch_update( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GesturePinchUpdateEvent, + ) { + todo!() + } + + fn gesture_pinch_end( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GesturePinchEndEvent, + ) { + todo!() + } + + fn gesture_hold_begin( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GestureHoldBeginEvent, + ) { + todo!() + } + + fn gesture_hold_end( + &self, + _seat: &Seat, + _data: &mut State, + _event: &smithay::input::pointer::GestureHoldEndEvent, + ) { + todo!() + } } impl KeyboardTarget for WindowElement {