yoda: fork pivot — Wayland-only + ungate winit + soft-fork libcosmic-yoda (squashed)
Squash of 7 yoda commits forming the fork pivot: -255cf7ccrename: libcosmic -> libcosmic-yoda (fork 0.1.0-yoda) -8701aa31feat(yoda): Wayland-only cut — drop winit and x11 features -6736a596yoda: soft-fork pivot — keep Cargo name 'libcosmic' for dep unification -3e23d087yoda: re-apply hard rename — libcosmic -> libcosmic-yoda (0.1.0-yoda) -aec3eb61yoda: ungate remaining winit+wayland combined cfgs -8ab7b158yoda-v2: color_picker Theme ref + context_menu/menu ungate winit -8d1d8739yoda: drop x11 defaults on iced_winit + iced_tiny_skia
This commit is contained in:
parent
10422b8f4a
commit
e3dcdf1fce
101 changed files with 77 additions and 98 deletions
51
Cargo.toml
51
Cargo.toml
|
|
@ -1,6 +1,11 @@
|
||||||
[package]
|
[package]
|
||||||
name = "libcosmic"
|
# Yoda fork: hard-renamed. Every consumer (leyoda/cosmic-files fork + each
|
||||||
version = "1.0.0"
|
# 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"
|
edition = "2024"
|
||||||
rust-version = "1.93"
|
rust-version = "1.93"
|
||||||
|
|
||||||
|
|
@ -9,12 +14,10 @@ name = "cosmic"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = [
|
default = [
|
||||||
"winit",
|
|
||||||
"tokio",
|
"tokio",
|
||||||
"a11y",
|
"a11y",
|
||||||
"dbus-config",
|
"dbus-config",
|
||||||
"x11",
|
"wayland",
|
||||||
"iced-wayland",
|
|
||||||
"multi-window",
|
"multi-window",
|
||||||
]
|
]
|
||||||
advanced-shaping = ["iced/advanced-shaping"]
|
advanced-shaping = ["iced/advanced-shaping"]
|
||||||
|
|
@ -35,7 +38,6 @@ animated-image = [
|
||||||
autosize = []
|
autosize = []
|
||||||
applet = [
|
applet = [
|
||||||
"autosize",
|
"autosize",
|
||||||
"winit",
|
|
||||||
"wayland",
|
"wayland",
|
||||||
"tokio",
|
"tokio",
|
||||||
"cosmic-panel-config",
|
"cosmic-panel-config",
|
||||||
|
|
@ -81,32 +83,34 @@ tokio = [
|
||||||
"cosmic-config/tokio",
|
"cosmic-config/tokio",
|
||||||
]
|
]
|
||||||
# Tokio async runtime
|
# Tokio async runtime
|
||||||
# Wayland window support
|
# Wayland window support (yoda fork is Wayland-only; always active in default).
|
||||||
iced-wayland = [
|
# 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",
|
"ashpd?/wayland",
|
||||||
"autosize",
|
"autosize",
|
||||||
|
"iced/winit",
|
||||||
"iced/wayland",
|
"iced/wayland",
|
||||||
"iced_winit/wayland",
|
"iced_winit/wayland",
|
||||||
"surface-message",
|
|
||||||
]
|
|
||||||
wayland = [
|
|
||||||
"iced-wayland",
|
|
||||||
"iced_runtime/cctk",
|
"iced_runtime/cctk",
|
||||||
"iced_winit/cctk",
|
"iced_winit/cctk",
|
||||||
"iced_wgpu/cctk",
|
"iced_wgpu/cctk",
|
||||||
"iced/cctk",
|
"iced/cctk",
|
||||||
|
"dep:iced_winit",
|
||||||
"dep:cctk",
|
"dep:cctk",
|
||||||
|
"surface-message",
|
||||||
]
|
]
|
||||||
surface-message = []
|
surface-message = []
|
||||||
# multi-window support
|
# multi-window support
|
||||||
multi-window = []
|
multi-window = []
|
||||||
# Render with wgpu
|
# Render with wgpu
|
||||||
wgpu = ["iced/wgpu", "iced_wgpu"]
|
wgpu = ["iced/wgpu", "iced_wgpu"]
|
||||||
# X11 window support via winit
|
# Compat stubs — kept empty so upstream deps (cosmic-files, cosmic-text, …)
|
||||||
winit = ["iced/winit", "iced_winit"]
|
# that still ask for `winit` / `x11` features resolve cleanly against the
|
||||||
winit_debug = ["winit", "debug"]
|
# yoda fork. Activating them has no effect: no code is gated on these.
|
||||||
winit_tokio = ["winit", "tokio"]
|
winit = []
|
||||||
winit_wgpu = ["winit", "wgpu"]
|
x11 = []
|
||||||
# Enables XDG portal integrations
|
# Enables XDG portal integrations
|
||||||
xdg-portal = ["ashpd"]
|
xdg-portal = ["ashpd"]
|
||||||
qr_code = ["iced/qr_code"]
|
qr_code = ["iced/qr_code"]
|
||||||
|
|
@ -119,7 +123,6 @@ async-std = [
|
||||||
"zbus?/async-io",
|
"zbus?/async-io",
|
||||||
"iced/async-std",
|
"iced/async-std",
|
||||||
]
|
]
|
||||||
x11 = ["iced/x11", "iced_winit/x11"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
apply = "0.3.0"
|
apply = "0.3.0"
|
||||||
|
|
@ -224,10 +227,17 @@ optional = true
|
||||||
|
|
||||||
[dependencies.iced_tiny_skia]
|
[dependencies.iced_tiny_skia]
|
||||||
path = "./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]
|
[dependencies.iced_winit]
|
||||||
path = "./iced/winit"
|
path = "./iced/winit"
|
||||||
optional = true
|
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]
|
[dependencies.iced_wgpu]
|
||||||
path = "./iced/wgpu"
|
path = "./iced/wgpu"
|
||||||
|
|
@ -243,9 +253,10 @@ members = [
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
"cosmic-config-derive",
|
"cosmic-config-derive",
|
||||||
"cosmic-theme",
|
"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]
|
[workspace.dependencies]
|
||||||
async-std = "1.13"
|
async-std = "1.13"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ edition = "2021"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
open = "5.3.3"
|
open = "5.3.3"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
features = [
|
features = [
|
||||||
"debug",
|
"debug",
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ tracing = "0.1"
|
||||||
env_logger = "0.10.2"
|
env_logger = "0.10.2"
|
||||||
log = "0.4.29"
|
log = "0.4.29"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["applet-token"]
|
features = ["applet-token"]
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@ edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["wayland"]
|
default = ["wayland"]
|
||||||
wayland = ["libcosmic/wayland"]
|
wayland = ["libcosmic-yoda/wayland"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
env_logger = "0.11"
|
env_logger = "0.11"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
features = [
|
features = [
|
||||||
"debug",
|
"debug",
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,6 @@ edition = "2024"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
jiff = "0.2"
|
jiff = "0.2"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]
|
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tracing = "0.1.44"
|
||||||
tracing-subscriber = "0.3.22"
|
tracing-subscriber = "0.3.22"
|
||||||
tracing-log = "0.2.0"
|
tracing-log = "0.2.0"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
features = [
|
features = [
|
||||||
"debug",
|
"debug",
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ publish = false
|
||||||
[dependencies]
|
[dependencies]
|
||||||
apply = "0.3.0"
|
apply = "0.3.0"
|
||||||
fraction = "0.15.3"
|
fraction = "0.15.3"
|
||||||
libcosmic = { path = "../..", features = [
|
libcosmic-yoda = { path = "../..", features = [
|
||||||
"debug",
|
"debug",
|
||||||
"winit",
|
"winit",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,6 @@ edition = "2021"
|
||||||
tracing = "0.1.44"
|
tracing = "0.1.44"
|
||||||
tracing-subscriber = "0.3.22"
|
tracing-subscriber = "0.3.22"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
features = ["debug", "winit", "wgpu", "tokio"]
|
features = ["debug", "winit", "wgpu", "tokio"]
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,6 @@ tracing = "0.1.44"
|
||||||
tracing-subscriber = "0.3.22"
|
tracing-subscriber = "0.3.22"
|
||||||
tracing-log = "0.2.0"
|
tracing-log = "0.2.0"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]
|
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,4 @@ edition = "2021"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libcosmic = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "wgpu", "wayland"] }
|
libcosmic-yoda = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "wgpu", "wayland"] }
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,6 @@ tracing = "0.1.44"
|
||||||
tracing-subscriber = "0.3.22"
|
tracing-subscriber = "0.3.22"
|
||||||
tracing-log = "0.2.0"
|
tracing-log = "0.2.0"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]
|
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["xdg-portal"]
|
default = ["xdg-portal"]
|
||||||
rfd = ["libcosmic/rfd"]
|
rfd = ["libcosmic-yoda/rfd"]
|
||||||
xdg-portal = ["libcosmic/xdg-portal"]
|
xdg-portal = ["libcosmic-yoda/xdg-portal"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
apply = "0.3.0"
|
apply = "0.3.0"
|
||||||
|
|
@ -15,6 +15,6 @@ tracing = "0.1.44"
|
||||||
tracing-subscriber = "0.3.22"
|
tracing-subscriber = "0.3.22"
|
||||||
url = "2.5.8"
|
url = "2.5.8"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
features = ["debug", "winit", "wgpu", "wayland", "tokio"]
|
features = ["debug", "winit", "wgpu", "wayland", "tokio"]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ edition = "2021"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
fraction = "0.15.3"
|
fraction = "0.15.3"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
features = ["debug", "wgpu", "winit", "desktop", "tokio"]
|
features = ["debug", "wgpu", "winit", "desktop", "tokio"]
|
||||||
path = "../.."
|
path = "../.."
|
||||||
default-features = false
|
default-features = false
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@ edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
features = ["debug", "winit", "wgpu", "tokio", "xdg-portal"]
|
features = ["debug", "winit", "wgpu", "tokio", "xdg-portal"]
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ tracing-subscriber = "0.3.22"
|
||||||
tracing-log = "0.2.0"
|
tracing-log = "0.2.0"
|
||||||
chrono = "*"
|
chrono = "*"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
features = ["debug", "wgpu", "winit", "desktop", "tokio"]
|
features = ["debug", "wgpu", "winit", "desktop", "tokio"]
|
||||||
path = "../.."
|
path = "../.."
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,6 @@ tracing = "0.1.44"
|
||||||
tracing-subscriber = "0.3.22"
|
tracing-subscriber = "0.3.22"
|
||||||
tracing-log = "0.2.0"
|
tracing-log = "0.2.0"
|
||||||
|
|
||||||
[dependencies.libcosmic]
|
[dependencies.libcosmic-yoda]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
features = ["debug", "winit", "wgpu", "tokio", "xdg-portal"]
|
features = ["debug", "winit", "wgpu", "tokio", "xdg-portal"]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
// Copyright 2023 System76 <info@system76.com>
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
use crate::app;
|
use crate::app;
|
||||||
#[cfg(feature = "single-instance")]
|
#[cfg(feature = "single-instance")]
|
||||||
use crate::dbus_activation;
|
use crate::dbus_activation;
|
||||||
|
|
@ -9,7 +8,6 @@ use crate::dbus_activation;
|
||||||
pub const fn app<M>(message: M) -> Action<M> {
|
pub const fn app<M>(message: M) -> Action<M> {
|
||||||
Action::App(message)
|
Action::App(message)
|
||||||
}
|
}
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
pub const fn cosmic<M>(message: app::Action) -> Action<M> {
|
pub const fn cosmic<M>(message: app::Action) -> Action<M> {
|
||||||
Action::Cosmic(message)
|
Action::Cosmic(message)
|
||||||
}
|
}
|
||||||
|
|
@ -23,7 +21,6 @@ pub const fn none<M>() -> Action<M> {
|
||||||
pub enum Action<M> {
|
pub enum Action<M> {
|
||||||
/// Messages from the application, for the application.
|
/// Messages from the application, for the application.
|
||||||
App(M),
|
App(M),
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
/// Internal messages to be handled by libcosmic.
|
/// Internal messages to be handled by libcosmic.
|
||||||
Cosmic(app::Action),
|
Cosmic(app::Action),
|
||||||
#[cfg(feature = "single-instance")]
|
#[cfg(feature = "single-instance")]
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,10 @@ pub fn set_title<M>(id: window::Id, title: String) -> iced::Task<crate::Action<M
|
||||||
iced::Task::none()
|
iced::Task::none()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
pub fn set_scaling_factor<M: Send + 'static>(factor: f32) -> iced::Task<crate::Action<M>> {
|
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)
|
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>> {
|
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)
|
iced::Task::done(crate::app::Action::AppThemeChange(theme)).map(crate::Action::Cosmic)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -432,7 +432,6 @@ impl Core {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
pub fn drag<M: Send + 'static>(&self, id: Option<window::Id>) -> crate::app::Task<M> {
|
pub fn drag<M: Send + 'static>(&self, id: Option<window::Id>) -> crate::app::Task<M> {
|
||||||
let Some(id) = id.or(self.main_window) else {
|
let Some(id) = id.or(self.main_window) else {
|
||||||
return iced::Task::none();
|
return iced::Task::none();
|
||||||
|
|
@ -440,7 +439,6 @@ impl Core {
|
||||||
crate::command::drag(id)
|
crate::command::drag(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
pub fn maximize<M: Send + 'static>(
|
pub fn maximize<M: Send + 'static>(
|
||||||
&self,
|
&self,
|
||||||
id: Option<window::Id>,
|
id: Option<window::Id>,
|
||||||
|
|
@ -452,7 +450,6 @@ impl Core {
|
||||||
crate::command::maximize(id, maximized)
|
crate::command::maximize(id, maximized)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
pub fn minimize<M: Send + 'static>(&self, id: Option<window::Id>) -> crate::app::Task<M> {
|
pub fn minimize<M: Send + 'static>(&self, id: Option<window::Id>) -> crate::app::Task<M> {
|
||||||
let Some(id) = id.or(self.main_window) else {
|
let Some(id) = id.or(self.main_window) else {
|
||||||
return iced::Task::none();
|
return iced::Task::none();
|
||||||
|
|
@ -460,7 +457,6 @@ impl Core {
|
||||||
crate::command::minimize(id)
|
crate::command::minimize(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
pub fn set_title<M: Send + 'static>(
|
pub fn set_title<M: Send + 'static>(
|
||||||
&self,
|
&self,
|
||||||
id: Option<window::Id>,
|
id: Option<window::Id>,
|
||||||
|
|
@ -472,7 +468,6 @@ impl Core {
|
||||||
crate::command::set_title(id, title)
|
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> {
|
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 {
|
let Some(id) = id.or(self.main_window) else {
|
||||||
return iced::Task::none();
|
return iced::Task::none();
|
||||||
|
|
@ -480,7 +475,6 @@ impl Core {
|
||||||
crate::command::set_windowed(id)
|
crate::command::set_windowed(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
pub fn toggle_maximize<M: Send + 'static>(
|
pub fn toggle_maximize<M: Send + 'static>(
|
||||||
&self,
|
&self,
|
||||||
id: Option<window::Id>,
|
id: Option<window::Id>,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
/// Recommended default imports.
|
/// Recommended default imports.
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
pub use crate::ApplicationExt;
|
pub use crate::ApplicationExt;
|
||||||
pub use crate::ext::*;
|
pub use crate::ext::*;
|
||||||
pub use crate::{Also, Apply, Element, Renderer, Task, Theme};
|
pub use crate::{Also, Apply, Element, Renderer, Task, Theme};
|
||||||
|
|
@ -21,9 +20,7 @@ pub use action::Action;
|
||||||
|
|
||||||
pub mod anim;
|
pub mod anim;
|
||||||
|
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
pub mod app;
|
pub mod app;
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use app::{Application, ApplicationExt};
|
pub use app::{Application, ApplicationExt};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
use super::Action;
|
use super::Action;
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
use crate::Application;
|
use crate::Application;
|
||||||
|
|
||||||
use iced::window;
|
use iced::window;
|
||||||
|
|
@ -28,7 +27,7 @@ pub fn destroy_window(id: iced_core::window::Id) -> Action {
|
||||||
Action::DestroyWindow(id)
|
Action::DestroyWindow(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn app_window<App: Application>(
|
pub fn app_window<App: Application>(
|
||||||
settings: impl Fn(&mut App) -> window::Settings + Send + Sync + 'static,
|
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.
|
/// 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]
|
#[must_use]
|
||||||
pub fn simple_window<Message: 'static>(
|
pub fn simple_window<Message: 'static>(
|
||||||
settings: impl Fn() -> window::Settings + Send + Sync + '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]
|
#[must_use]
|
||||||
pub fn app_popup<App: Application>(
|
pub fn app_popup<App: Application>(
|
||||||
settings: impl Fn(&mut App) -> iced_runtime::platform_specific::wayland::popup::SctkPopupSettings
|
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.
|
/// 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]
|
#[must_use]
|
||||||
pub fn simple_subsurface<Message: 'static, V>(
|
pub fn simple_subsurface<Message: 'static, V>(
|
||||||
settings: impl Fn() -> iced_runtime::platform_specific::wayland::subsurface::SctkSubsurfaceSettings
|
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.
|
/// 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]
|
#[must_use]
|
||||||
pub fn simple_popup<Message: 'static>(
|
pub fn simple_popup<Message: 'static>(
|
||||||
settings: impl Fn() -> iced_runtime::platform_specific::wayland::popup::SctkPopupSettings
|
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]
|
#[must_use]
|
||||||
pub fn subsurface<App: Application>(
|
pub fn subsurface<App: Application>(
|
||||||
settings: impl Fn(
|
settings: impl Fn(
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ mod text_input;
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use self::text_input::TextInput;
|
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;
|
pub mod tooltip;
|
||||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||||
pub use tooltip::Tooltip;
|
pub use tooltip::Tooltip;
|
||||||
|
|
|
||||||
|
|
@ -619,8 +619,10 @@ where
|
||||||
let bounds = canvas_layout.bounds();
|
let bounds = canvas_layout.bounds();
|
||||||
// Draw the handle on the saturation value canvas
|
// Draw the handle on the saturation value canvas
|
||||||
|
|
||||||
let t = THEME.lock().unwrap().clone();
|
// Yoda: use the Theme passed into draw() instead of locking the global
|
||||||
let t = t.cosmic();
|
// 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 handle_radius = f32::from(t.space_xs()) / 2.0;
|
||||||
let (x, y) = (
|
let (x, y) = (
|
||||||
self.active_color
|
self.active_color
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
use crate::app::cosmic::{WINDOWING_SYSTEM, WindowingSystem};
|
use crate::app::cosmic::{WINDOWING_SYSTEM, WindowingSystem};
|
||||||
|
|
@ -67,7 +66,6 @@ impl<Message: Clone + 'static> ContextMenu<'_, Message> {
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
#[allow(clippy::too_many_lines)]
|
#[allow(clippy::too_many_lines)]
|
||||||
|
|
@ -378,7 +376,6 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, crate::Renderer>
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
||||||
|
|
@ -422,7 +419,6 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, crate::Renderer>
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
|
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
|
||||||
|
|
@ -444,7 +440,6 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, crate::Renderer>
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
||||||
|
|
@ -483,7 +478,6 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, crate::Renderer>
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ pub fn popup_dropdown<
|
||||||
let dropdown: Dropdown<'_, S, Message, AppMessage> =
|
let dropdown: Dropdown<'_, S, Message, AppMessage> =
|
||||||
Dropdown::new(selections.into(), selected, on_selected);
|
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);
|
let dropdown = dropdown.with_popup(_parent_id, _on_surface_action, _map_action);
|
||||||
|
|
||||||
dropdown
|
dropdown
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ where
|
||||||
action_map: Option<Arc<dyn Fn(Message) -> AppMessage + 'static + Send + Sync>>,
|
action_map: Option<Arc<dyn Fn(Message) -> AppMessage + 'static + Send + Sync>>,
|
||||||
#[setters(strip_option)]
|
#[setters(strip_option)]
|
||||||
window_id: Option<window::Id>,
|
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,
|
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -96,14 +96,14 @@ where
|
||||||
text_line_height: text::LineHeight::Relative(1.2),
|
text_line_height: text::LineHeight::Relative(1.2),
|
||||||
font: None,
|
font: None,
|
||||||
window_id: 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(),
|
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner::default(),
|
||||||
on_surface_action: None,
|
on_surface_action: None,
|
||||||
action_map: 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.
|
/// Handle dropdown requests for popup creation.
|
||||||
/// Intended to be used with [`crate::app::message::get_popup`]
|
/// Intended to be used with [`crate::app::message::get_popup`]
|
||||||
pub fn with_popup<NewAppMessage>(
|
pub fn with_popup<NewAppMessage>(
|
||||||
|
|
@ -154,7 +154,7 @@ where
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
|
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||||
pub fn with_positioner(
|
pub fn with_positioner(
|
||||||
mut self,
|
mut self,
|
||||||
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
|
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
|
||||||
|
|
@ -268,7 +268,7 @@ where
|
||||||
layout,
|
layout,
|
||||||
cursor,
|
cursor,
|
||||||
shell,
|
shell,
|
||||||
#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]
|
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||||
self.positioner.clone(),
|
self.positioner.clone(),
|
||||||
self.on_selected.clone(),
|
self.on_selected.clone(),
|
||||||
self.selected,
|
self.selected,
|
||||||
|
|
@ -346,7 +346,7 @@ where
|
||||||
viewport: &Rectangle,
|
viewport: &Rectangle,
|
||||||
translation: Vector,
|
translation: Vector,
|
||||||
) -> Option<overlay::Element<'b, Message, crate::Theme, crate::Renderer>> {
|
) -> 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() {
|
if self.window_id.is_some() || self.on_surface_action.is_some() {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
@ -545,7 +545,7 @@ pub fn update<
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
cursor: mouse::Cursor,
|
cursor: mouse::Cursor,
|
||||||
shell: &mut Shell<'_, Message>,
|
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,
|
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
|
||||||
on_selected: Arc<dyn Fn(usize) -> Message + Send + Sync + 'static>,
|
on_selected: Arc<dyn Fn(usize) -> Message + Send + Sync + 'static>,
|
||||||
selected: Option<usize>,
|
selected: Option<usize>,
|
||||||
|
|
@ -571,7 +571,7 @@ pub fn update<
|
||||||
*hovered_guard = selected;
|
*hovered_guard = selected;
|
||||||
let id = window::Id::unique();
|
let id = window::Id::unique();
|
||||||
state.popup_id = id;
|
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
|
if let Some(((on_surface_action, parent), action_map)) = on_surface_action
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.zip(_window_id)
|
.zip(_window_id)
|
||||||
|
|
@ -658,7 +658,7 @@ pub fn update<
|
||||||
state.close_operation = false;
|
state.close_operation = false;
|
||||||
state.is_open.store(false, Ordering::SeqCst);
|
state.is_open.store(false, Ordering::SeqCst);
|
||||||
if is_open {
|
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 {
|
if let Some(ref on_close) = on_surface_action {
|
||||||
shell.publish(on_close(surface::action::destroy_popup(state.popup_id)));
|
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
|
// 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.
|
// bounds or on the drop-down, either way we close the overlay.
|
||||||
state.is_open.store(false, Ordering::Relaxed);
|
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 {
|
if let Some(on_close) = on_surface_action {
|
||||||
shell.publish(on_close(surface::action::destroy_popup(state.popup_id)));
|
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`].
|
/// Returns the current menu widget of a [`Dropdown`].
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn menu_widget<
|
pub fn menu_widget<
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ use crate::Renderer;
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
use crate::app::cosmic::{WINDOWING_SYSTEM, WindowingSystem};
|
use crate::app::cosmic::{WINDOWING_SYSTEM, WindowingSystem};
|
||||||
|
|
@ -194,7 +193,6 @@ pub struct MenuBar<Message> {
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
feature = "winit",
|
|
||||||
target_os = "linux"
|
target_os = "linux"
|
||||||
))]
|
))]
|
||||||
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
|
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner,
|
||||||
|
|
@ -234,7 +232,6 @@ where
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
feature = "winit",
|
|
||||||
target_os = "linux"
|
target_os = "linux"
|
||||||
))]
|
))]
|
||||||
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner::default(),
|
positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner::default(),
|
||||||
|
|
@ -333,7 +330,6 @@ where
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
feature = "winit",
|
|
||||||
target_os = "linux"
|
target_os = "linux"
|
||||||
))]
|
))]
|
||||||
pub fn with_positioner(
|
pub fn with_positioner(
|
||||||
|
|
@ -371,7 +367,6 @@ where
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
#[allow(clippy::too_many_lines)]
|
#[allow(clippy::too_many_lines)]
|
||||||
|
|
@ -643,7 +638,6 @@ where
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
{
|
{
|
||||||
|
|
@ -667,7 +661,6 @@ where
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
|
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
|
||||||
|
|
@ -682,7 +675,6 @@ where
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
|
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) {
|
||||||
|
|
@ -765,7 +757,6 @@ where
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ use super::menu_tree::MenuTree;
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
use crate::app::cosmic::{WINDOWING_SYSTEM, WindowingSystem};
|
use crate::app::cosmic::{WINDOWING_SYSTEM, WindowingSystem};
|
||||||
|
|
@ -680,7 +679,6 @@ impl<'b, Message: Clone + 'static> Menu<'b, Message> {
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
|
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(
|
#[cfg(all(
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message",
|
feature = "surface-message",
|
||||||
target_os = "linux"
|
target_os = "linux"
|
||||||
))]
|
))]
|
||||||
|
|
@ -1228,7 +1225,6 @@ pub(crate) fn init_root_menu<Message: Clone>(
|
||||||
feature = "multi-window",
|
feature = "multi-window",
|
||||||
feature = "wayland",
|
feature = "wayland",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "winit",
|
|
||||||
feature = "surface-message"
|
feature = "surface-message"
|
||||||
))]
|
))]
|
||||||
pub(super) fn init_root_popup_menu<Message>(
|
pub(super) fn init_root_popup_menu<Message>(
|
||||||
|
|
@ -1525,7 +1521,7 @@ where
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.is_some_and(|i| *i != new_index && !active_menu[*i].children.is_empty());
|
.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 matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland)) && remove {
|
||||||
if let Some(id) = state.popup_id.remove(&menu.window_id) {
|
if let Some(id) = state.popup_id.remove(&menu.window_id) {
|
||||||
state.active_root.truncate(menu.depth + 1);
|
state.active_root.truncate(menu.depth + 1);
|
||||||
|
|
|
||||||
|
|
@ -312,7 +312,7 @@ pub use toggler::{Toggler, toggler};
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use tooltip::{Tooltip, tooltip};
|
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 wayland;
|
||||||
|
|
||||||
pub mod tooltip {
|
pub mod tooltip {
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue