Merge tag 'epoch-1.7.0' into local/yoda-main

Epoch 1.7.0
This commit is contained in:
Lionel DARNIS 2026-08-27 07:49:24 +02:00
commit af6d31f413
12 changed files with 552 additions and 49 deletions

View file

@ -1614,6 +1614,29 @@ impl Common {
a11y_keyboard_monitor.refresh();
}
self.image_copy_capture_state.cleanup();
self.cleanup_cursor_images();
}
/// Release the enlarged cursor frames a finished shake or zoom left behind.
fn cleanup_cursor_images(&mut self) {
let shell = self.shell.read();
let zoomed = shell.zoom_state.as_ref().is_some_and(|zoom_state| {
shell
.outputs()
.any(|output| zoom_state.animating_level(output) > 1.0)
});
let now = Instant::now();
for seat in shell.seats.iter() {
if let Some(cursor_state) = seat
.user_data()
.get::<crate::backend::render::cursor::CursorState>()
{
cursor_state
.lock()
.unwrap()
.drop_magnified_frames(now, zoomed);
}
}
}
pub fn refresh_idle_inhibit(&mut self) {
@ -2286,6 +2309,11 @@ impl Shell {
.is_some_and(|state| state.lock().unwrap().is_animating())
})
})
|| self.seats.iter().any(|seat| {
seat.user_data()
.get::<crate::backend::render::cursor::CursorState>()
.is_some_and(|state| state.lock().unwrap().is_magnifying())
})
}
pub fn update_animations(&mut self) -> HashMap<ClientId, Client> {

View file

@ -7,7 +7,7 @@ use cosmic::{
theme,
widget::{self, icon::Named},
};
use cosmic_comp_config::ZoomMovement;
use cosmic_comp_config::{ZoomConfig, ZoomMovement};
use cosmic_config::ConfigSet;
use keyframe::{ease, functions::Linear};
use smithay::{
@ -447,7 +447,7 @@ pub enum MenuMessage {
impl ZoomProgram {
pub fn new(level: f64, movement: ZoomMovement, increment: u32) -> Self {
let mut increments = vec![25, 50, 100, 150, 200];
let mut increments = ZoomConfig::ZOOM_INCREMENT_PRESETS.to_vec();
if !increments.contains(&increment) {
increments.push(increment);
}
@ -829,7 +829,7 @@ impl Program for ZoomProgram {
if let Some(pos) = self.increments.iter().position(|val| *val == increment) {
self.increment_idx = pos;
} else {
let mut increments = vec![25, 50, 100, 150, 200];
let mut increments = ZoomConfig::ZOOM_INCREMENT_PRESETS.to_vec();
if !increments.contains(&increment) {
increments.push(increment);
}