Unify window presentation and frame-driven shell motion
Share window geometry across overview, resize snapshots and retained closes. Advance close handoffs and group retained rendering by stacking position. Drive shell motion from surface frames, reuse settled widget content, and synchronize notification materials with each card's fade. Replace physical config keys with duration and bounce, and update documentation and regression coverage.
This commit is contained in:
1 parent
f8bc17e913
commit
64a80dc069
33 files changed
+1742
-600
No files matched your search
@@ -481,6 +481,7 @@ pub(super) struct EffectsBinding {
|
||||
_queue: EventQueue<EffectsState>,
|
||||
regions: std::cell::RefCell<Option<Vec<[f32; 5]>>>,
|
||||
opacity: std::cell::Cell<Option<u32>>,
|
||||
region_opacities: std::cell::RefCell<Vec<u32>>,
|
||||
}
|
||||
|
||||
impl EffectsBinding {
|
||||
@@ -504,7 +505,7 @@ impl EffectsBinding {
|
||||
let connection = Connection::from_backend(backend);
|
||||
let (globals, queue) = registry_queue_init::<EffectsState>(&connection)?;
|
||||
let qh = queue.handle();
|
||||
let manager = globals.bind::<FereseEffectsManagerV1, _, _>(&qh, 3..=3, ())?;
|
||||
let manager = globals.bind::<FereseEffectsManagerV1, _, _>(&qh, 4..=4, ())?;
|
||||
let effects = manager.get_surface_effects(surface, &qh, ());
|
||||
|
||||
let opacity = (opacity.clamp(0.0, 1.0) * 1000.0).round() as u32;
|
||||
@@ -523,9 +524,28 @@ impl EffectsBinding {
|
||||
_queue: queue,
|
||||
regions: Default::default(),
|
||||
opacity: std::cell::Cell::new(Some(opacity)),
|
||||
region_opacities: Default::default(),
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) fn set_region_opacities(
|
||||
&self,
|
||||
values: impl IntoIterator<Item = f32>,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let values: Vec<u32> = values
|
||||
.into_iter()
|
||||
.take(32)
|
||||
.map(|value| (value.clamp(0.0, 1.0) * 1000.0).round() as u32)
|
||||
.collect();
|
||||
if *self.region_opacities.borrow() != values {
|
||||
self.surface
|
||||
.set_region_opacities(values.iter().flat_map(|value| value.to_ne_bytes()).collect());
|
||||
self.connection.flush()?;
|
||||
*self.region_opacities.borrow_mut() = values;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(super) fn set_regions(&self, regions: &[[f32; 5]]) -> Result<(), Box<dyn std::error::Error>> {
|
||||
self.set_material_regions(regions, ferese_surface_effects_v1::Role::Popover)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user