Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
This bumps all dependencies, including Smithay.
  • Loading branch information
chrisduerr committed Nov 24, 2024
1 parent 7a10535 commit f1c709f
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 115 deletions.
179 changes: 84 additions & 95 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ serde_json = "1.0.85"
serde = { version = "1.0.144", features = ["derive"] }
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
udev = "0.8.0"
udev = "0.9.1"
indexmap = "2.5.0"
4 changes: 1 addition & 3 deletions src/catacomb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,9 +811,7 @@ impl XdgActivationHandler for Catacomb {
};

Seat::from_resource(&seat).as_ref() == Some(&self.seat)
&& keyboard
.last_enter()
.map_or(false, |last_enter| serial.is_no_older_than(&last_enter))
&& keyboard.last_enter().is_some_and(|last_enter| serial.is_no_older_than(&last_enter))
}

fn request_activation(
Expand Down
6 changes: 3 additions & 3 deletions src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ impl Catacomb {
// Check if surface captures shortcuts.
let inhibits_shortcuts = compositor::with_states(&input_surface.surface, |states| {
let data = states.data_map.get::<CatacombSurfaceData>();
data.map_or(false, |data| data.inhibits_shortcuts)
data.is_some_and(|data| data.inhibits_shortcuts)
});

// Check if there's a gesture for this touch event.
Expand Down Expand Up @@ -906,10 +906,10 @@ impl Catacomb {
state: KeyState,
) -> FilterResult<InputAction> {
// Check if focused surface inhibits shortcuts.
let inhibits_shortcuts = catacomb.last_focus().map_or(false, |surface| {
let inhibits_shortcuts = catacomb.last_focus().is_some_and(|surface| {
compositor::with_states(surface, |states| {
let data = states.data_map.get::<CatacombSurfaceData>();
data.map_or(false, |data| data.inhibits_shortcuts)
data.is_some_and(|data| data.inhibits_shortcuts)
})
});
if inhibits_shortcuts {
Expand Down
4 changes: 2 additions & 2 deletions src/overview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ impl Overview {
};

// Check if click was within secondary window.
if layout.secondary().map_or(false, contains_point) {
if layout.secondary().is_some_and(contains_point) {
return Some(LayoutPosition::new(layout_index, true));
}

// Check if click was within primary window.
if layout.primary().map_or(false, contains_point) {
if layout.primary().is_some_and(contains_point) {
return Some(LayoutPosition::new(layout_index, false));
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/windows/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ impl Layouts {
let secondary = layout.secondary.as_deref().map(RefCell::borrow_mut);

// Determine window which might need resizing.
let growing_window = if primary.as_ref().map_or(false, |win| &win.surface == surface) {
let growing_window = if primary.as_ref().is_some_and(|win| &win.surface == surface) {
secondary
} else if secondary.as_ref().map_or(false, |win| &win.surface == surface) {
} else if secondary.as_ref().is_some_and(|win| &win.surface == surface) {
primary
} else {
continue;
Expand Down Expand Up @@ -621,7 +621,7 @@ impl Layout {
let secondary = self.secondary.as_deref().map(RefCell::borrow_mut);

if let Some(mut primary) = primary {
let secondary_alive = secondary.as_ref().map_or(false, |window| window.alive());
let secondary_alive = secondary.as_ref().is_some_and(|window| window.alive());
let rectangle = output.primary_rectangle(secondary_alive);
primary.set_dimensions(output.scale(), rectangle);
}
Expand Down
2 changes: 1 addition & 1 deletion src/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ impl Windows {
View::Fullscreen(window) => {
window.borrow().dirty() || self.layers.overlay().any(Window::dirty)
},
View::Lock(window) => window.as_ref().map_or(false, |window| window.dirty()),
View::Lock(window) => window.as_ref().is_some_and(|window| window.dirty()),
View::DragAndDrop(_) => false,
}
}
Expand Down
11 changes: 4 additions & 7 deletions src/windows/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use smithay::wayland::compositor::{
};
use smithay::wayland::fractional_scale;
use smithay::wayland::presentation::{
PresentationFeedbackCachedState, PresentationFeedbackCallback,
PresentationFeedbackCachedState, PresentationFeedbackCallback, Refresh,
};
use smithay::wayland::shell::wlr_layer::{
Anchor, ExclusiveZone, KeyboardInteractivity, Layer, LayerSurfaceCachedState,
Expand Down Expand Up @@ -366,7 +366,7 @@ impl<S: Surface + 'static> Window<S> {
return;
}

let refresh = output.frame_interval();
let refresh = Refresh::Fixed(output.frame_interval());
let output = output.smithay_output();

// Try to get monitor clock.
Expand All @@ -386,7 +386,7 @@ impl<S: Surface + 'static> Window<S> {

for PresentationCallback { callback, surface } in self.presentation_callbacks.drain(..) {
// Set zero-copy flag if direct scanout was used.
let zero_copy = states.element_render_state(&surface).map_or(false, |states| {
let zero_copy = states.element_render_state(&surface).is_some_and(|states| {
states.presentation_state == RenderElementPresentationState::ZeroCopy
});
let flags = if zero_copy { FeedbackKind::ZeroCopy } else { flags };
Expand Down Expand Up @@ -743,10 +743,7 @@ impl<S: Surface + 'static> Window<S> {
}

for window in &mut self.popups {
popup = match window.add_popup(popup, parent) {
Some(popup) => popup,
None => return None,
};
popup = window.add_popup(popup, parent)?;
}

Some(popup)
Expand Down

0 comments on commit f1c709f

Please sign in to comment.