cleanup: thingys
This commit is contained in:
@@ -36,18 +36,18 @@ impl<T: Send + Sync + ?Sized> Registry<T> {
|
||||
|
||||
for pair in new.0.iter() {
|
||||
let (id, entry) = pair.pair();
|
||||
if let Some(entry) = entry.upgrade() {
|
||||
if !old.0.contains_key(id) {
|
||||
added.push(entry);
|
||||
}
|
||||
if let Some(entry) = entry.upgrade()
|
||||
&& !old.0.contains_key(id)
|
||||
{
|
||||
added.push(entry);
|
||||
}
|
||||
}
|
||||
for pair in old.0.iter() {
|
||||
let (id, entry) = pair.pair();
|
||||
if let Some(entry) = entry.upgrade() {
|
||||
if !new.0.contains_key(id) {
|
||||
removed.push(entry);
|
||||
}
|
||||
if let Some(entry) = entry.upgrade()
|
||||
&& !new.0.contains_key(id)
|
||||
{
|
||||
removed.push(entry);
|
||||
}
|
||||
}
|
||||
(added, removed)
|
||||
|
||||
@@ -138,10 +138,10 @@ pub fn process_input() {
|
||||
if !handler_node.enabled() {
|
||||
continue;
|
||||
}
|
||||
if let Some(handler_field_node) = handler.field.spatial.node() {
|
||||
if !handler_field_node.enabled() {
|
||||
continue;
|
||||
}
|
||||
if let Some(handler_field_node) = handler.field.spatial.node()
|
||||
&& !handler_field_node.enabled()
|
||||
{
|
||||
continue;
|
||||
};
|
||||
|
||||
let ser_span = debug_span!("serializing input").entered();
|
||||
|
||||
@@ -20,14 +20,13 @@ pub struct CaptureManager {
|
||||
}
|
||||
impl CaptureManager {
|
||||
pub fn update_capture(&mut self, method: &InputMethod) {
|
||||
if let Some(capture) = &self.capture.upgrade() {
|
||||
if !method
|
||||
if let Some(capture) = &self.capture.upgrade()
|
||||
&& !method
|
||||
.capture_attempts
|
||||
.get_valid_contents()
|
||||
.contains(capture)
|
||||
{
|
||||
self.capture = Weak::new();
|
||||
}
|
||||
{
|
||||
self.capture = Weak::new();
|
||||
}
|
||||
}
|
||||
pub fn set_new_capture(
|
||||
|
||||
@@ -22,7 +22,7 @@ impl Popup {
|
||||
let _ = surface
|
||||
.wl_surface
|
||||
.surface_id
|
||||
.set(SurfaceId::Child(rand::thread_rng().gen_range(0..u64::MAX)));
|
||||
.set(SurfaceId::Child(rand::rng().random()));
|
||||
|
||||
let positioner_data = positioner.data();
|
||||
Self {
|
||||
|
||||
Reference in New Issue
Block a user