feat: add helpers for getting and using activation tokens in applets

refactor(applet): connect to privileged socket if available

cleanup
This commit is contained in:
Ashley Wulber 2023-11-14 16:55:06 -05:00 committed by Ashley Wulber
parent c9554a8740
commit ef5b6fb44a
9 changed files with 310 additions and 8 deletions

View file

@ -5,6 +5,8 @@ use super::{command, Application, ApplicationExt, Core, Subscription};
use crate::theme::{self, Theme, ThemeType, THEME};
use crate::widget::nav_bar;
use crate::{keyboard_nav, Element};
#[cfg(feature = "wayland")]
use cctk::sctk::reexports::csd_frame::{WindowManagerCapabilities, WindowState};
use cosmic_theme::ThemeMode;
#[cfg(feature = "wayland")]
use iced::event::wayland::{self, WindowEvent};
@ -15,8 +17,6 @@ use iced::window;
use iced_runtime::command::Action;
#[cfg(not(feature = "wayland"))]
use iced_runtime::window::Action as WindowAction;
#[cfg(feature = "wayland")]
use sctk::reexports::csd_frame::{WindowManagerCapabilities, WindowState};
/// A message managed internally by COSMIC.
#[derive(Clone, Debug)]