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 yoda 45eaaf16, 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-crash c0b653f5 (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:
Lionel DARNIS 2026-08-19 21:55:00 +02:00
commit 9535ada4d0
60 changed files with 3187 additions and 1528 deletions

View file

@ -9,12 +9,7 @@ use super::menu_inner::{
};
use super::menu_tree::MenuTree;
use crate::Renderer;
#[cfg(all(
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "surface-message"
))]
#[cfg(wayland_platform)]
use crate::app::cosmic::{WINDOWING_SYSTEM, WindowingSystem};
use crate::style::menu_bar::StyleSheet;
use crate::widget::RcWrapper;
@ -178,11 +173,7 @@ pub struct MenuBar<Message> {
menu_roots: Vec<MenuTree<Message>>,
style: <crate::Theme as StyleSheet>::Style,
window_id: window::Id,
#[cfg(all(
feature = "multi-window",
feature = "wayland",
target_os = "linux"
))]
#[cfg(wayland_platform)]
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
pub(crate) on_surface_action:
Option<Arc<dyn Fn(crate::surface::Action) -> Message + Send + Sync + 'static>>,
@ -217,11 +208,7 @@ where
menu_roots,
style: <crate::Theme as StyleSheet>::Style::default(),
window_id: window::Id::RESERVED,
#[cfg(all(
feature = "multi-window",
feature = "wayland",
target_os = "linux"
))]
#[cfg(wayland_platform)]
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner::default(),
on_surface_action: None,
}
@ -315,11 +302,7 @@ where
self
}
#[cfg(all(
feature = "multi-window",
feature = "wayland",
target_os = "linux"
))]
#[cfg(wayland_platform)]
pub fn with_positioner(
mut self,
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
@ -351,12 +334,7 @@ where
self
}
#[cfg(all(
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "surface-message"
))]
#[cfg(wayland_platform)]
#[allow(clippy::too_many_lines)]
fn create_popup(
&mut self,
@ -638,11 +616,7 @@ where
state.menu_states.clear();
state.active_root.clear();
state.open = false;
#[cfg(all(
feature = "wayland",
target_os = "linux",
feature = "surface-message"
))]
#[cfg(wayland_platform)]
{
let surface_action = self.on_surface_action.as_ref().unwrap();
shell.capture_event();
@ -660,12 +634,7 @@ where
return;
}
shell.capture_event();
#[cfg(all(
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "surface-message"
))]
#[cfg(wayland_platform)]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
self.create_popup(layout, view_cursor, renderer, shell, viewport, my_state);
}
@ -673,13 +642,9 @@ where
Mouse(mouse::Event::CursorMoved { .. } | mouse::Event::CursorEntered)
if open && view_cursor.is_over(layout.bounds()) =>
{
shell.request_redraw();
shell.capture_event();
#[cfg(all(
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "surface-message"
))]
#[cfg(wayland_platform)]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
self.create_popup(layout, view_cursor, renderer, shell, viewport, my_state);
}
@ -710,12 +675,7 @@ where
// draw path highlight
if self.path_highlight.is_some() {
let mut is_overlay = true;
#[cfg(all(
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "surface-message"
))]
#[cfg(wayland_platform)]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
&& self.on_surface_action.is_some()
&& self.window_id != window::Id::NONE
@ -769,12 +729,7 @@ where
_viewport: &Rectangle,
translation: Vector,
) -> Option<overlay::Element<'b, Message, crate::Theme, Renderer>> {
#[cfg(all(
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "surface-message"
))]
#[cfg(wayland_platform)]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
&& self.on_surface_action.is_some()
&& self.window_id != window::Id::NONE