yoda: fork pivot — Wayland-only + ungate winit + soft-fork libcosmic-yoda (squashed)

Squash of 7 yoda commits forming the fork pivot:
- 255cf7cc rename: libcosmic -> libcosmic-yoda (fork 0.1.0-yoda)
- 8701aa31 feat(yoda): Wayland-only cut — drop winit and x11 features
- 6736a596 yoda: soft-fork pivot — keep Cargo name 'libcosmic' for dep unification
- 3e23d087 yoda: re-apply hard rename — libcosmic -> libcosmic-yoda (0.1.0-yoda)
- aec3eb61 yoda: ungate remaining winit+wayland combined cfgs
- 8ab7b158 yoda-v2: color_picker Theme ref + context_menu/menu ungate winit
- 8d1d8739 yoda: drop x11 defaults on iced_winit + iced_tiny_skia
This commit is contained in:
Lionel DARNIS 2026-05-25 13:02:07 +02:00
parent 10422b8f4a
commit e3dcdf1fce
101 changed files with 77 additions and 98 deletions

View file

@ -1,6 +1,11 @@
[package]
name = "libcosmic"
version = "1.0.0"
# Yoda fork: hard-renamed. Every consumer (leyoda/cosmic-files fork + each
# leyoda/cosmic-* app) depends directly on `libcosmic-yoda` by path, bypassing
# pop-os/libcosmic entirely. No [patch] shenanigans needed — transitive deps
# that used to ask for `libcosmic` are replaced by deps on our forks that ask
# for `libcosmic-yoda`.
name = "libcosmic-yoda"
version = "0.1.0-yoda.2"
edition = "2024"
rust-version = "1.93"
@ -9,12 +14,10 @@ name = "cosmic"
[features]
default = [
"winit",
"tokio",
"a11y",
"dbus-config",
"x11",
"iced-wayland",
"wayland",
"multi-window",
]
advanced-shaping = ["iced/advanced-shaping"]
@ -35,7 +38,6 @@ animated-image = [
autosize = []
applet = [
"autosize",
"winit",
"wayland",
"tokio",
"cosmic-panel-config",
@ -81,32 +83,34 @@ tokio = [
"cosmic-config/tokio",
]
# Tokio async runtime
# Wayland window support
iced-wayland = [
# Wayland window support (yoda fork is Wayland-only; always active in default).
# We still need iced/winit because pop-os/iced hosts the runtime dispatcher
# (`iced_winit as shell`) there — the name is a misnomer, it's the same crate
# that provides both the winit path AND the sctk/cctk wayland path.
wayland = [
"ashpd?/wayland",
"autosize",
"iced/winit",
"iced/wayland",
"iced_winit/wayland",
"surface-message",
]
wayland = [
"iced-wayland",
"iced_runtime/cctk",
"iced_winit/cctk",
"iced_wgpu/cctk",
"iced/cctk",
"dep:iced_winit",
"dep:cctk",
"surface-message",
]
surface-message = []
# multi-window support
multi-window = []
# Render with wgpu
wgpu = ["iced/wgpu", "iced_wgpu"]
# X11 window support via winit
winit = ["iced/winit", "iced_winit"]
winit_debug = ["winit", "debug"]
winit_tokio = ["winit", "tokio"]
winit_wgpu = ["winit", "wgpu"]
# Compat stubs — kept empty so upstream deps (cosmic-files, cosmic-text, …)
# that still ask for `winit` / `x11` features resolve cleanly against the
# yoda fork. Activating them has no effect: no code is gated on these.
winit = []
x11 = []
# Enables XDG portal integrations
xdg-portal = ["ashpd"]
qr_code = ["iced/qr_code"]
@ -119,7 +123,6 @@ async-std = [
"zbus?/async-io",
"iced/async-std",
]
x11 = ["iced/x11", "iced_winit/x11"]
[dependencies]
apply = "0.3.0"
@ -224,10 +227,17 @@ optional = true
[dependencies.iced_tiny_skia]
path = "./iced/tiny_skia"
# Yoda: drop the x11 default → softbuffer no longer pulls tiny-xlib/x11-dl/etc.
default-features = false
features = ["wayland"]
[dependencies.iced_winit]
path = "./iced/winit"
optional = true
# Yoda: drop the x11 default → winit won't pull winit-x11/tiny-xlib/x11-dl.
# Keep wayland + wayland-dlopen (default behaviour minus x11).
default-features = false
features = ["wayland", "wayland-dlopen"]
[dependencies.iced_wgpu]
path = "./iced/wgpu"
@ -243,9 +253,10 @@ members = [
"cosmic-config",
"cosmic-config-derive",
"cosmic-theme",
"examples/*",
]
exclude = ["iced"]
# examples/* excluded — many depend on the removed winit/x11 features.
# They will be revisited and adapted in a later phase.
exclude = ["iced", "examples"]
[workspace.dependencies]
async-std = "1.13"

View file

@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
open = "5.3.3"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
features = [
"debug",

View file

@ -12,7 +12,7 @@ tracing = "0.1"
env_logger = "0.10.2"
log = "0.4.29"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
default-features = false
features = ["applet-token"]

View file

@ -5,12 +5,12 @@ edition = "2021"
[features]
default = ["wayland"]
wayland = ["libcosmic/wayland"]
wayland = ["libcosmic-yoda/wayland"]
[dependencies]
env_logger = "0.11"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
features = [
"debug",

View file

@ -8,6 +8,6 @@ edition = "2024"
[dependencies]
jiff = "0.2"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]

View file

@ -8,7 +8,7 @@ tracing = "0.1.44"
tracing-subscriber = "0.3.22"
tracing-log = "0.2.0"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
features = [
"debug",

View file

@ -8,7 +8,7 @@ publish = false
[dependencies]
apply = "0.3.0"
fraction = "0.15.3"
libcosmic = { path = "../..", features = [
libcosmic-yoda = { path = "../..", features = [
"debug",
"winit",
"tokio",

View file

@ -7,6 +7,6 @@ edition = "2021"
tracing = "0.1.44"
tracing-subscriber = "0.3.22"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
features = ["debug", "winit", "wgpu", "tokio"]

View file

@ -8,6 +8,6 @@ tracing = "0.1.44"
tracing-subscriber = "0.3.22"
tracing-log = "0.2.0"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]

View file

@ -6,4 +6,4 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
libcosmic = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "wgpu", "wayland"] }
libcosmic-yoda = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "wgpu", "wayland"] }

View file

@ -8,6 +8,6 @@ tracing = "0.1.44"
tracing-subscriber = "0.3.22"
tracing-log = "0.2.0"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]

View file

@ -5,8 +5,8 @@ edition = "2021"
[features]
default = ["xdg-portal"]
rfd = ["libcosmic/rfd"]
xdg-portal = ["libcosmic/xdg-portal"]
rfd = ["libcosmic-yoda/rfd"]
xdg-portal = ["libcosmic-yoda/xdg-portal"]
[dependencies]
apply = "0.3.0"
@ -15,6 +15,6 @@ tracing = "0.1.44"
tracing-subscriber = "0.3.22"
url = "2.5.8"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
features = ["debug", "winit", "wgpu", "wayland", "tokio"]
path = "../../"

View file

@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
fraction = "0.15.3"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
features = ["debug", "wgpu", "winit", "desktop", "tokio"]
path = "../.."
default-features = false

View file

@ -5,6 +5,6 @@ edition = "2024"
[dependencies]
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
features = ["debug", "winit", "wgpu", "tokio", "xdg-portal"]

View file

@ -9,6 +9,6 @@ tracing-subscriber = "0.3.22"
tracing-log = "0.2.0"
chrono = "*"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
features = ["debug", "wgpu", "winit", "desktop", "tokio"]
path = "../.."

View file

@ -8,6 +8,6 @@ tracing = "0.1.44"
tracing-subscriber = "0.3.22"
tracing-log = "0.2.0"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
features = ["debug", "winit", "wgpu", "tokio", "xdg-portal"]

View file

@ -1,7 +1,6 @@
// Copyright 2023 System76 <info@system76.com>
// SPDX-License-Identifier: MPL-2.0
#[cfg(feature = "winit")]
use crate::app;
#[cfg(feature = "single-instance")]
use crate::dbus_activation;
@ -9,7 +8,6 @@ use crate::dbus_activation;
pub const fn app<M>(message: M) -> Action<M> {
Action::App(message)
}
#[cfg(feature = "winit")]
pub const fn cosmic<M>(message: app::Action) -> Action<M> {
Action::Cosmic(message)
}
@ -23,7 +21,6 @@ pub const fn none<M>() -> Action<M> {
pub enum Action<M> {
/// Messages from the application, for the application.
App(M),
#[cfg(feature = "winit")]
/// Internal messages to be handled by libcosmic.
Cosmic(app::Action),
#[cfg(feature = "single-instance")]

View file

@ -27,12 +27,10 @@ pub fn set_title<M>(id: window::Id, title: String) -> iced::Task<crate::Action<M
iced::Task::none()
}
#[cfg(feature = "winit")]
pub fn set_scaling_factor<M: Send + 'static>(factor: f32) -> iced::Task<crate::Action<M>> {
iced::Task::done(crate::app::Action::ScaleFactor(factor)).map(crate::Action::Cosmic)
}
#[cfg(feature = "winit")]
pub fn set_theme<M: Send + 'static>(theme: crate::Theme) -> iced::Task<crate::Action<M>> {
iced::Task::done(crate::app::Action::AppThemeChange(theme)).map(crate::Action::Cosmic)
}

View file

@ -432,7 +432,6 @@ impl Core {
id
}
#[cfg(feature = "winit")]
pub fn drag<M: Send + 'static>(&self, id: Option<window::Id>) -> crate::app::Task<M> {
let Some(id) = id.or(self.main_window) else {
return iced::Task::none();
@ -440,7 +439,6 @@ impl Core {
crate::command::drag(id)
}
#[cfg(feature = "winit")]
pub fn maximize<M: Send + 'static>(
&self,
id: Option<window::Id>,
@ -452,7 +450,6 @@ impl Core {
crate::command::maximize(id, maximized)
}
#[cfg(feature = "winit")]
pub fn minimize<M: Send + 'static>(&self, id: Option<window::Id>) -> crate::app::Task<M> {
let Some(id) = id.or(self.main_window) else {
return iced::Task::none();
@ -460,7 +457,6 @@ impl Core {
crate::command::minimize(id)
}
#[cfg(feature = "winit")]
pub fn set_title<M: Send + 'static>(
&self,
id: Option<window::Id>,
@ -472,7 +468,6 @@ impl Core {
crate::command::set_title(id, title)
}
#[cfg(feature = "winit")]
pub fn set_windowed<M: Send + 'static>(&self, id: Option<window::Id>) -> crate::app::Task<M> {
let Some(id) = id.or(self.main_window) else {
return iced::Task::none();
@ -480,7 +475,6 @@ impl Core {
crate::command::set_windowed(id)
}
#[cfg(feature = "winit")]
pub fn toggle_maximize<M: Send + 'static>(
&self,
id: Option<window::Id>,

View file

@ -7,7 +7,6 @@
/// Recommended default imports.
pub mod prelude {
#[cfg(feature = "winit")]
pub use crate::ApplicationExt;
pub use crate::ext::*;
pub use crate::{Also, Apply, Element, Renderer, Task, Theme};
@ -21,9 +20,7 @@ pub use action::Action;
pub mod anim;
#[cfg(feature = "winit")]
pub mod app;
#[cfg(feature = "winit")]
#[doc(inline)]
pub use app::{Application, ApplicationExt};

View file

@ -2,7 +2,6 @@
// SPDX-License-Identifier: MPL-2.0
use super::Action;
#[cfg(feature = "winit")]
use crate::Application;
use iced::window;
@ -28,7 +27,7 @@ pub fn destroy_window(id: iced_core::window::Id) -> Action {
Action::DestroyWindow(id)
}
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
#[must_use]
pub fn app_window<App: Application>(
settings: impl Fn(&mut App) -> window::Settings + Send + Sync + 'static,
@ -61,7 +60,7 @@ pub fn app_window<App: Application>(
}
/// Used to create a window message from within a widget.
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
#[must_use]
pub fn simple_window<Message: 'static>(
settings: impl Fn() -> window::Settings + Send + Sync + 'static,
@ -93,7 +92,7 @@ pub fn simple_window<Message: 'static>(
)
}
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
#[must_use]
pub fn app_popup<App: Application>(
settings: impl Fn(&mut App) -> iced_runtime::platform_specific::wayland::popup::SctkPopupSettings
@ -127,7 +126,7 @@ pub fn app_popup<App: Application>(
}
/// Used to create a subsurface message from within a widget.
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
#[must_use]
pub fn simple_subsurface<Message: 'static, V>(
settings: impl Fn() -> iced_runtime::platform_specific::wayland::subsurface::SctkSubsurfaceSettings
@ -156,7 +155,7 @@ pub fn simple_subsurface<Message: 'static, V>(
}
/// Used to create a popup message from within a widget.
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
#[must_use]
pub fn simple_popup<Message: 'static>(
settings: impl Fn() -> iced_runtime::platform_specific::wayland::popup::SctkPopupSettings
@ -187,7 +186,7 @@ pub fn simple_popup<Message: 'static>(
)
}
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
#[must_use]
pub fn subsurface<App: Application>(
settings: impl Fn(

View file

@ -32,7 +32,7 @@ mod text_input;
#[doc(inline)]
pub use self::text_input::TextInput;
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
pub mod tooltip;
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
pub use tooltip::Tooltip;

View file

@ -619,8 +619,10 @@ where
let bounds = canvas_layout.bounds();
// Draw the handle on the saturation value canvas
let t = THEME.lock().unwrap().clone();
let t = t.cosmic();
// Yoda: use the Theme passed into draw() instead of locking the global
// THEME Mutex and cloning the whole Theme. Fires on every color-picker
// redraw, so saving the Mutex lock + full Theme clone adds up.
let t = theme.cosmic();
let handle_radius = f32::from(t.space_xs()) / 2.0;
let (x, y) = (
self.active_color

View file

@ -6,7 +6,6 @@
#[cfg(all(
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
use crate::app::cosmic::{WINDOWING_SYSTEM, WindowingSystem};
@ -67,7 +66,6 @@ impl<Message: Clone + 'static> ContextMenu<'_, Message> {
#[cfg(all(
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
#[allow(clippy::too_many_lines)]
@ -378,7 +376,6 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, crate::Renderer>
#[cfg(all(
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
@ -422,7 +419,6 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, crate::Renderer>
#[cfg(all(
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
@ -444,7 +440,6 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, crate::Renderer>
#[cfg(all(
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
@ -483,7 +478,6 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, crate::Renderer>
#[cfg(all(
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))

View file

@ -50,7 +50,7 @@ pub fn popup_dropdown<
let dropdown: Dropdown<'_, S, Message, AppMessage> =
Dropdown::new(selections.into(), selected, on_selected);
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
let dropdown = dropdown.with_popup(_parent_id, _on_surface_action, _map_action);
dropdown

View file

@ -60,7 +60,7 @@ where
action_map: Option<Arc<dyn Fn(Message) -> AppMessage + 'static + Send + Sync>>,
#[setters(strip_option)]
window_id: Option<window::Id>,
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
}
@ -96,14 +96,14 @@ where
text_line_height: text::LineHeight::Relative(1.2),
font: None,
window_id: None,
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner::default(),
on_surface_action: None,
action_map: None,
}
}
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
/// Handle dropdown requests for popup creation.
/// Intended to be used with [`crate::app::message::get_popup`]
pub fn with_popup<NewAppMessage>(
@ -154,7 +154,7 @@ where
self
}
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
pub fn with_positioner(
mut self,
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
@ -268,7 +268,7 @@ where
layout,
cursor,
shell,
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
self.positioner.clone(),
self.on_selected.clone(),
self.selected,
@ -346,7 +346,7 @@ where
viewport: &Rectangle,
translation: Vector,
) -> Option<overlay::Element<'b, Message, crate::Theme, crate::Renderer>> {
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
if self.window_id.is_some() || self.on_surface_action.is_some() {
return None;
}
@ -545,7 +545,7 @@ pub fn update<
layout: Layout<'_>,
cursor: mouse::Cursor,
shell: &mut Shell<'_, Message>,
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
on_selected: Arc<dyn Fn(usize) -> Message + Send + Sync + 'static>,
selected: Option<usize>,
@ -571,7 +571,7 @@ pub fn update<
*hovered_guard = selected;
let id = window::Id::unique();
state.popup_id = id;
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
if let Some(((on_surface_action, parent), action_map)) = on_surface_action
.as_ref()
.zip(_window_id)
@ -658,7 +658,7 @@ pub fn update<
state.close_operation = false;
state.is_open.store(false, Ordering::SeqCst);
if is_open {
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
if let Some(ref on_close) = on_surface_action {
shell.publish(on_close(surface::action::destroy_popup(state.popup_id)));
}
@ -681,7 +681,7 @@ pub fn update<
// Event wasn't processed by overlay, so cursor was clicked either outside it's
// bounds or on the drop-down, either way we close the overlay.
state.is_open.store(false, Ordering::Relaxed);
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
if let Some(on_close) = on_surface_action {
shell.publish(on_close(surface::action::destroy_popup(state.popup_id)));
}
@ -726,7 +726,7 @@ pub fn mouse_interaction(layout: Layout<'_>, cursor: mouse::Cursor) -> mouse::In
}
}
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
/// Returns the current menu widget of a [`Dropdown`].
#[allow(clippy::too_many_arguments)]
pub fn menu_widget<

View file

@ -13,7 +13,6 @@ use crate::Renderer;
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
use crate::app::cosmic::{WINDOWING_SYSTEM, WindowingSystem};
@ -194,7 +193,6 @@ pub struct MenuBar<Message> {
#[cfg(all(
feature = "multi-window",
feature = "wayland",
feature = "winit",
target_os = "linux"
))]
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
@ -234,7 +232,6 @@ where
#[cfg(all(
feature = "multi-window",
feature = "wayland",
feature = "winit",
target_os = "linux"
))]
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner::default(),
@ -333,7 +330,6 @@ where
#[cfg(all(
feature = "multi-window",
feature = "wayland",
feature = "winit",
target_os = "linux"
))]
pub fn with_positioner(
@ -371,7 +367,6 @@ where
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
#[allow(clippy::too_many_lines)]
@ -643,7 +638,6 @@ where
#[cfg(all(
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
{
@ -667,7 +661,6 @@ where
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
@ -682,7 +675,6 @@ where
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
@ -765,7 +757,6 @@ where
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))

View file

@ -10,7 +10,6 @@ use super::menu_tree::MenuTree;
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
use crate::app::cosmic::{WINDOWING_SYSTEM, WindowingSystem};
@ -680,7 +679,6 @@ impl<'b, Message: Clone + 'static> Menu<'b, Message> {
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
@ -965,7 +963,6 @@ impl<Message: std::clone::Clone + 'static> Widget<Message, crate::Theme, crate::
#[cfg(all(
feature = "multi-window",
feature = "wayland",
feature = "winit",
feature = "surface-message",
target_os = "linux"
))]
@ -1228,7 +1225,6 @@ pub(crate) fn init_root_menu<Message: Clone>(
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
pub(super) fn init_root_popup_menu<Message>(
@ -1525,7 +1521,7 @@ where
.as_ref()
.is_some_and(|i| *i != new_index && !active_menu[*i].children.is_empty());
#[cfg(all(feature = "multi-window", feature = "wayland",target_os = "linux", feature = "winit", feature = "surface-message"))]
#[cfg(all(feature = "multi-window", feature = "wayland", target_os = "linux", feature = "surface-message"))]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) && remove {
if let Some(id) = state.popup_id.remove(&menu.window_id) {
state.active_root.truncate(menu.depth + 1);

View file

@ -312,7 +312,7 @@ pub use toggler::{Toggler, toggler};
#[doc(inline)]
pub use tooltip::{Tooltip, tooltip};
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
#[cfg(all(feature = "wayland", target_os = "linux"))]
pub mod wayland;
pub mod tooltip {

Some files were not shown because too many files have changed in this diff Show more