File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,17 @@ where
230230 iced_winit:: commands:: popup:: destroy_popup ( id)
231231 }
232232 #[ cfg( feature = "wayland" ) ]
233+ crate :: surface:: Action :: DestroyTooltipPopup => {
234+ #[ cfg( feature = "applet" ) ]
235+ {
236+ iced_winit:: commands:: popup:: destroy_popup ( * crate :: applet:: TOOLTIP_WINDOW_ID )
237+ }
238+ #[ cfg( not( feature = "applet" ) ) ]
239+ {
240+ Task :: none ( )
241+ }
242+ }
243+ #[ cfg( feature = "wayland" ) ]
233244 crate :: surface:: Action :: DestroySubsurface ( id) => {
234245 iced_winit:: commands:: subsurface:: destroy_subsurface ( id)
235246 }
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ static AUTOSIZE_ID: LazyLock<iced::id::Id> =
4242static AUTOSIZE_MAIN_ID : LazyLock < iced:: id:: Id > =
4343 LazyLock :: new ( || iced:: id:: Id :: new ( "cosmic-applet-autosize-main" ) ) ;
4444static TOOLTIP_ID : LazyLock < crate :: widget:: Id > = LazyLock :: new ( || iced:: id:: Id :: new ( "subsurface" ) ) ;
45- static TOOLTIP_WINDOW_ID : LazyLock < window:: Id > = LazyLock :: new ( window:: Id :: unique) ;
45+ pub ( crate ) static TOOLTIP_WINDOW_ID : LazyLock < window:: Id > = LazyLock :: new ( window:: Id :: unique) ;
4646
4747#[ derive( Debug , Clone ) ]
4848pub struct Context {
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ pub enum Action {
3636 ) ,
3737 /// Destroy a subsurface with a view function
3838 DestroyPopup ( iced:: window:: Id ) ,
39+ /// Destroys the global tooltip popup subsurface
40+ DestroyTooltipPopup ,
3941
4042 /// Create a window with a view function accepting the App as a parameter
4143 AppWindow (
@@ -85,6 +87,7 @@ impl std::fmt::Debug for Action {
8587 }
8688 Self :: Popup ( arg0, arg1) => f. debug_tuple ( "Popup" ) . field ( arg0) . field ( arg1) . finish ( ) ,
8789 Self :: DestroyPopup ( arg0) => f. debug_tuple ( "DestroyPopup" ) . field ( arg0) . finish ( ) ,
90+ Self :: DestroyTooltipPopup => f. debug_tuple ( "DestroyTooltipPopup" ) . finish ( ) ,
8891 Self :: ResponsiveMenuBar {
8992 menu_bar,
9093 limits,
You can’t perform that action at this time.
0 commit comments