cleanup: thingys

This commit is contained in:
Nova
2025-09-21 00:39:55 -07:00
parent 928886563d
commit 76fc1bfab5
5 changed files with 19 additions and 26 deletions

View File

@@ -73,7 +73,7 @@ bevy_core_pipeline = { git = "https://github.com/Schmarni-Dev/bevy", branch = "p
# small utility thingys # small utility thingys
nanoid = "0.4.0" nanoid = "0.4.0"
lazy_static = "1.5.0" lazy_static = "1.5.0"
rand = "0.8.5" rand = "0.9.2"
rustc-hash = "2.0.0" rustc-hash = "2.0.0"
slotmap = "1.0.7" slotmap = "1.0.7"
global_counter = "=0.2.2" global_counter = "=0.2.2"
@@ -145,13 +145,7 @@ xkbcommon-rs = "0.1.0"
cosmic-text = "0.14.2" cosmic-text = "0.14.2"
# Wayland # Wayland
# waynest = { git = "https://github.com/verdiwm/waynest.git", branch="codec-test", features = [ waynest = { git = "https://github.com/verdiwm/waynest.git", branch="codec-test", features = [
# "server",
# "stable",
# "mesa",
# "tracing",
# ], default-features = false, optional = true }
waynest = { git = "https://github.com/technobaboo/waynest.git", branch = "fix/fd_clear", features = [
"server", "server",
"stable", "stable",
"mesa", "mesa",

View File

@@ -36,18 +36,18 @@ impl<T: Send + Sync + ?Sized> Registry<T> {
for pair in new.0.iter() { for pair in new.0.iter() {
let (id, entry) = pair.pair(); let (id, entry) = pair.pair();
if let Some(entry) = entry.upgrade() { if let Some(entry) = entry.upgrade()
if !old.0.contains_key(id) { && !old.0.contains_key(id)
added.push(entry); {
} added.push(entry);
} }
} }
for pair in old.0.iter() { for pair in old.0.iter() {
let (id, entry) = pair.pair(); let (id, entry) = pair.pair();
if let Some(entry) = entry.upgrade() { if let Some(entry) = entry.upgrade()
if !new.0.contains_key(id) { && !new.0.contains_key(id)
removed.push(entry); {
} removed.push(entry);
} }
} }
(added, removed) (added, removed)

View File

@@ -138,10 +138,10 @@ pub fn process_input() {
if !handler_node.enabled() { if !handler_node.enabled() {
continue; continue;
} }
if let Some(handler_field_node) = handler.field.spatial.node() { if let Some(handler_field_node) = handler.field.spatial.node()
if !handler_field_node.enabled() { && !handler_field_node.enabled()
continue; {
} continue;
}; };
let ser_span = debug_span!("serializing input").entered(); let ser_span = debug_span!("serializing input").entered();

View File

@@ -20,14 +20,13 @@ pub struct CaptureManager {
} }
impl CaptureManager { impl CaptureManager {
pub fn update_capture(&mut self, method: &InputMethod) { pub fn update_capture(&mut self, method: &InputMethod) {
if let Some(capture) = &self.capture.upgrade() { if let Some(capture) = &self.capture.upgrade()
if !method && !method
.capture_attempts .capture_attempts
.get_valid_contents() .get_valid_contents()
.contains(capture) .contains(capture)
{ {
self.capture = Weak::new(); self.capture = Weak::new();
}
} }
} }
pub fn set_new_capture( pub fn set_new_capture(

View File

@@ -22,7 +22,7 @@ impl Popup {
let _ = surface let _ = surface
.wl_surface .wl_surface
.surface_id .surface_id
.set(SurfaceId::Child(rand::thread_rng().gen_range(0..u64::MAX))); .set(SurfaceId::Child(rand::rng().random()));
let positioner_data = positioner.data(); let positioner_data = positioner.data();
Self { Self {