Update deps

This commit is contained in:
Ottatop 2024-05-16 13:31:21 -05:00
parent dbccfa9c76
commit cd8e15a7c3
10 changed files with 57 additions and 51 deletions

36
Cargo.lock generated
View file

@ -330,9 +330,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "bytemuck"
version = "1.15.0"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15"
checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5"
dependencies = [
"bytemuck_derive",
]
@ -1410,7 +1410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19"
dependencies = [
"cfg-if",
"windows-targets 0.48.5",
"windows-targets 0.52.5",
]
[[package]]
@ -2290,18 +2290,18 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.201"
version = "1.0.202"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c"
checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.201"
version = "1.0.202"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865"
checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838"
dependencies = [
"proc-macro2",
"quote",
@ -2321,9 +2321,9 @@ dependencies = [
[[package]]
name = "serde_spanned"
version = "0.6.5"
version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"
checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0"
dependencies = [
"serde",
]
@ -2381,7 +2381,7 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c"
[[package]]
name = "smithay"
version = "0.3.0"
source = "git+https://github.com/Smithay/smithay?rev=0398269#0398269eab5e0e1be212d960f7010dfb53f07978"
source = "git+https://github.com/Smithay/smithay?rev=271fbc0#271fbc0209692c943a7f1092fbad4dea52e36be0"
dependencies = [
"appendlist",
"ash",
@ -2456,7 +2456,7 @@ dependencies = [
[[package]]
name = "smithay-drm-extras"
version = "0.1.0"
source = "git+https://github.com/Smithay/smithay?rev=0398269#0398269eab5e0e1be212d960f7010dfb53f07978"
source = "git+https://github.com/Smithay/smithay?rev=271fbc0#271fbc0209692c943a7f1092fbad4dea52e36be0"
dependencies = [
"drm",
"edid-rs",
@ -2700,21 +2700,21 @@ dependencies = [
[[package]]
name = "toml"
version = "0.8.12"
version = "0.8.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3"
checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"toml_edit 0.22.12",
"toml_edit 0.22.13",
]
[[package]]
name = "toml_datetime"
version = "0.6.5"
version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
dependencies = [
"serde",
]
@ -2732,9 +2732,9 @@ dependencies = [
[[package]]
name = "toml_edit"
version = "0.22.12"
version = "0.22.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef"
checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c"
dependencies = [
"indexmap 2.2.6",
"serde",

View file

@ -35,7 +35,7 @@ tempfile = "3.10.1"
[workspace.dependencies.smithay]
git = "https://github.com/Smithay/smithay"
rev = "0398269"
rev = "271fbc0"
default-features = false
features = [
"desktop",
@ -77,14 +77,14 @@ keywords = ["wayland", "compositor", "smithay", "lua"]
[dependencies]
# Smithay
smithay = { workspace = true }
smithay-drm-extras = { git = "https://github.com/Smithay/smithay", rev = "0398269" }
smithay-drm-extras = { git = "https://github.com/Smithay/smithay", rev = "271fbc0" }
# Tracing
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tracing-appender = "0.2.3"
# Errors
anyhow = { version = "1.0.81", features = ["backtrace"] }
thiserror = "1.0.58"
anyhow = { version = "1.0.83", features = ["backtrace"] }
thiserror = "1.0.60"
# xcursor stuff
xcursor = { version = "0.3.5" }
image = { version = "0.25.1", default-features = false }
@ -100,18 +100,18 @@ clap = { workspace = true }
cliclack = "0.2.5"
# Misc.
bitflags = { workspace = true }
serde = { version = "1.0.197", features = ["derive"] }
toml = "0.8.12"
serde = { version = "1.0.202", features = ["derive"] }
toml = "0.8.13"
shellexpand = { version = "3.1.0", features = ["path"] }
x11rb = { version = "0.13.0", default-features = false, features = ["composite"] }
x11rb = { version = "0.13.1", default-features = false, features = ["composite"] }
xkbcommon = { workspace = true }
xdg = { workspace = true }
sysinfo = "0.30.10"
sysinfo = "0.30.12"
# nix = { version = "0.28.0", features = ["user", "resource", "process", "signal"] }
pinnacle-api-defs = { workspace = true }
dircpy = { workspace = true }
chrono = "0.4.37"
bytemuck = "1.15.0"
chrono = "0.4.38"
bytemuck = "1.16.0"
pinnacle-api = { path = "./api/rust" }
gag = "1.0.0"
@ -121,7 +121,7 @@ vergen = { version = "8.3.1", features = ["git", "gitcl", "rustc", "cargo", "si"
[dev-dependencies]
temp-env = "0.3.6"
tempfile = { workspace = true }
test-log = { version = "0.2.15", default-features = false, features = ["trace"] }
test-log = { version = "0.2.16", default-features = false, features = ["trace"] }
pinnacle = { path = ".", features = ["wlcs"] }
pinnacle-api = { path = "./api/rust" }

View file

@ -17,7 +17,7 @@ use smithay::{
backend::{
allocator::{
dmabuf::{AnyError, Dmabuf, DmabufAllocator},
gbm::{GbmAllocator, GbmBufferFlags, GbmDevice},
gbm::{GbmAllocator, GbmBuffer, GbmBufferFlags, GbmDevice},
vulkan::{ImageUsageFlags, VulkanAllocator},
Allocator, Buffer, Fourcc,
},
@ -67,7 +67,6 @@ use smithay::{
RegistrationToken,
},
drm::control::{connector, crtc, ModeTypeFlags},
gbm::BufferObject,
input::Libinput,
rustix::fs::OFlags,
wayland_protocols::wp::{
@ -122,7 +121,8 @@ type UdevRenderer<'a> = MultiRenderer<
type UdevRenderFrameResult<'a> = RenderFrameResult<
'a,
BufferObject<()>,
// BufferObject<()>,
GbmBuffer,
GbmFramebuffer,
OutputRenderElement<UdevRenderer<'a>, WaylandSurfaceRenderElement<UdevRenderer<'a>>>,
>;
@ -1712,7 +1712,7 @@ fn handle_pending_screencopy<'a>(
screencopy.damage(&damage);
}
let sync_point = if let Ok(dmabuf) = dmabuf::get_dmabuf(screencopy.buffer()) {
let sync_point = if let Ok(dmabuf) = dmabuf::get_dmabuf(screencopy.buffer()).cloned() {
trace!("Dmabuf screencopy");
let format_correct =

View file

@ -463,7 +463,7 @@ impl Winit {
}
}
let sync_point = if let Ok(dmabuf) = dmabuf::get_dmabuf(screencopy.buffer()) {
let sync_point = if let Ok(dmabuf) = dmabuf::get_dmabuf(screencopy.buffer()).cloned() {
trace!("Dmabuf screencopy");
backend

View file

@ -1,3 +1,5 @@
use std::borrow::Cow;
use smithay::{
backend::input::KeyState,
desktop::{LayerSurface, PopupKind, WindowSurface},
@ -123,12 +125,12 @@ impl IsAlive for KeyboardFocusTarget {
}
impl WaylandFocus for KeyboardFocusTarget {
fn wl_surface(&self) -> Option<WlSurface> {
fn wl_surface(&self) -> Option<Cow<'_, WlSurface>> {
match self {
KeyboardFocusTarget::Window(window) => window.wl_surface(),
KeyboardFocusTarget::Popup(popup) => Some(popup.wl_surface().clone()),
KeyboardFocusTarget::LayerSurface(surf) => Some(surf.wl_surface().clone()),
KeyboardFocusTarget::LockSurface(lock) => Some(lock.wl_surface().clone()),
KeyboardFocusTarget::Popup(popup) => Some(Cow::Borrowed(popup.wl_surface())),
KeyboardFocusTarget::LayerSurface(surf) => Some(Cow::Borrowed(surf.wl_surface())),
KeyboardFocusTarget::LockSurface(lock) => Some(Cow::Borrowed(lock.wl_surface())),
}
}
@ -153,7 +155,7 @@ impl TryFrom<KeyboardFocusTarget> for WlSurface {
type Error = ();
fn try_from(value: KeyboardFocusTarget) -> Result<Self, Self::Error> {
value.wl_surface().ok_or(())
value.wl_surface().map(Cow::into_owned).ok_or(())
}
}

View file

@ -1,3 +1,5 @@
use std::borrow::Cow;
use pinnacle_api_defs::pinnacle::signal::v0alpha1::{
WindowPointerEnterResponse, WindowPointerLeaveResponse,
};
@ -384,10 +386,10 @@ impl TouchTarget<State> for PointerFocusTarget {
}
impl WaylandFocus for PointerFocusTarget {
fn wl_surface(&self) -> Option<WlSurface> {
fn wl_surface(&self) -> Option<Cow<'_, WlSurface>> {
match self {
PointerFocusTarget::WlSurface(surf) => Some(surf.clone()),
PointerFocusTarget::X11Surface(surf) => surf.wl_surface(),
PointerFocusTarget::WlSurface(surf) => Some(Cow::Borrowed(surf)),
PointerFocusTarget::X11Surface(surf) => surf.wl_surface().map(Cow::Owned),
}
}

View file

@ -99,7 +99,9 @@ impl CompositorHandler for State {
.buffer
.as_ref()
.and_then(|assignment| match assignment {
BufferAssignment::NewBuffer(buffer) => dmabuf::get_dmabuf(buffer).ok(),
BufferAssignment::NewBuffer(buffer) => {
dmabuf::get_dmabuf(buffer).cloned().ok()
}
_ => None,
})
});
@ -155,7 +157,7 @@ impl CompositorHandler for State {
.pinnacle
.new_windows
.iter()
.find(|win| win.wl_surface().as_ref() == Some(surface))
.find(|win| win.wl_surface().is_some_and(|surf| &*surf == surface))
.cloned()
{
let Some(is_mapped) =

View file

@ -324,7 +324,7 @@ impl State {
// which seems very scuffed.
if pointer.current_focus().as_ref() == surface_under.as_ref().map(|s| &s.0) {
if let Some((surf, surf_loc)) =
surface_under.and_then(|(foc, loc)| Some((foc.wl_surface()?, loc)))
surface_under.and_then(|(foc, loc)| Some((foc.wl_surface()?.into_owned(), loc)))
{
let unlocked = with_pointer_constraint(&surf, &pointer, |constraint| {
let Some(constraint) = constraint else {
@ -883,7 +883,7 @@ impl State {
let region = region
.clone()
.or_else(|| {
compositor::with_states(&focus.wl_surface()?, |states| {
compositor::with_states(&*focus.wl_surface()?, |states| {
states
.cached_state
.current::<SurfaceAttributes>()
@ -894,7 +894,7 @@ impl State {
.or_else(|| {
// No region or input region means constrain within the whole surface
let surface_size =
with_renderer_surface_state(&focus.wl_surface()?, |state| {
with_renderer_surface_state(&*focus.wl_surface()?, |state| {
state.surface_size()
})??;

View file

@ -96,7 +96,7 @@ pub fn refresh(state: &mut State) {
.pinnacle
.windows
.iter()
.any(|win| win.wl_surface().as_ref() == Some(surface))
.any(|win| win.wl_surface().is_some_and(|surf| &*surf == surface))
{
return true;
}

View file

@ -231,11 +231,11 @@ impl Pinnacle {
pub fn window_for_surface(&self, surface: &WlSurface) -> Option<WindowElement> {
self.space
.elements()
.find(|window| window.wl_surface().map(|s| s == *surface).unwrap_or(false))
.find(|window| window.wl_surface().map(|s| &*s == surface).unwrap_or(false))
.or_else(|| {
self.windows
.iter()
.find(|&win| win.wl_surface().is_some_and(|surf| &surf == surface))
.find(|&win| win.wl_surface().is_some_and(|surf| &*surf == surface))
})
.cloned()
}
@ -246,7 +246,7 @@ impl Pinnacle {
pub fn new_window_for_surface(&self, surface: &WlSurface) -> Option<WindowElement> {
self.new_windows
.iter()
.find(|&win| win.wl_surface().is_some_and(|surf| &surf == surface))
.find(|&win| win.wl_surface().is_some_and(|surf| &*surf == surface))
.cloned()
}
}