Merge upstream/master (COSMIC 1.6) into main
Aligne le fork sur epoch-1.6.0 (63 commits amont) en preservant les 19 commits yoda. Resolutions notables : - les cfg `all(feature = "wayland", target_os = "linux")` deviennent l alias `wayland_platform` introduit en amont ; il exclut winit comme le faisait le patch yoda45eaaf16, l intention est donc preservee ; - les features iced `cctk` ont ete renommees `wayland` en amont, la feature `wayland` locale est adaptee ; `winit` reste un marqueur vide et `iced/winit` est liste explicitement ; - cctk/ashpd gardent leurs chemins locaux dans la section conditionnelle unix introduite en amont ; - la garde anti-crashc0b653f5(context_menu non assigne) est conservee par-dessus la nouvelle structure amont ; - traductions ca/oc restaurees depuis amont. Le submodule iced suit (merge + correctif du cfg cctk residuel). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
9535ada4d0
60 changed files with 3187 additions and 1528 deletions
|
|
@ -180,13 +180,21 @@ where
|
|||
let state = tree.state.downcast_mut::<State>();
|
||||
|
||||
if state.needs_update {
|
||||
shell.publish((self.on_action)(
|
||||
crate::surface::Action::ResponsiveMenuBar {
|
||||
menu_bar: self.id.clone(),
|
||||
limits: state.limits,
|
||||
size: state.size,
|
||||
},
|
||||
));
|
||||
// `needs_update` stays set while the content cannot fit, don't publish messages in a
|
||||
// busy loop
|
||||
let announcement = (state.limits, state.size);
|
||||
|
||||
if state.announced != Some(announcement) {
|
||||
state.announced = Some(announcement);
|
||||
shell.publish((self.on_action)(
|
||||
crate::surface::Action::ResponsiveMenuBar {
|
||||
menu_bar: self.id.clone(),
|
||||
limits: announcement.0,
|
||||
size: announcement.1,
|
||||
},
|
||||
));
|
||||
}
|
||||
|
||||
state.needs_update = false;
|
||||
}
|
||||
|
||||
|
|
@ -328,6 +336,8 @@ struct State {
|
|||
limits: Limits,
|
||||
size: Size,
|
||||
needs_update: bool,
|
||||
/// The `(limits, size)` last announced, so an unsatisfiable layout does not announce forever
|
||||
announced: Option<(Limits, Size)>,
|
||||
}
|
||||
|
||||
impl State {
|
||||
|
|
@ -336,6 +346,7 @@ impl State {
|
|||
limits: Limits::NONE,
|
||||
size: Size::new(0., 0.),
|
||||
needs_update: false,
|
||||
announced: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue