Support building with wayland backend

This commit is contained in:
Jeremy Soller 2024-06-27 09:03:44 -06:00
parent e81f9701f6
commit cce891827e
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
3 changed files with 276 additions and 438 deletions

701
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -47,16 +47,18 @@ slotmap = "1.0.7"
[dependencies.libcosmic]
git = "https://github.com/pop-os/libcosmic.git"
default-features = false
features = ["a11y", "multi-window", "tokio", "winit"]
features = ["a11y", "multi-window", "tokio"]
[dependencies.smol_str]
version = "0.2.1"
features = ["serde"]
[features]
default = ["desktop", "gvfs", "wgpu"]
default = ["desktop", "gvfs", "winit", "wgpu"]
desktop = ["libcosmic/desktop", "dep:freedesktop_entry_parser", "dep:xdg"]
gvfs = ["dep:gio"]
wayland = ["libcosmic/wayland"]
winit = ["libcosmic/winit"]
wgpu = ["libcosmic/wgpu"]
[profile.dev]

View file

@ -1,6 +1,10 @@
// Copyright 2023 System76 <inflist_o@system76.com>
// Copyright 2023 System76 <info@system76.com>
// SPDX-License-Identifier: GPL-3.0-only
#[cfg(feature = "winit")]
use cosmic::iced::multi_window::Application as IcedApplication;
#[cfg(feature = "wayland")]
use cosmic::iced::Application as IcedApplication;
use cosmic::{
app::{self, cosmic::Cosmic, message, Command, Core},
cosmic_theme, executor,
@ -8,7 +12,6 @@ use cosmic::{
event,
futures::{self, SinkExt},
keyboard::{Event as KeyEvent, Modifiers},
multi_window::Application as IcedApplication,
subscription::{self, Subscription},
widget::scrollable,
window, Event, Length, Size,