diff --git a/examples/applet/src/window.rs b/examples/applet/src/window.rs index 15085d8..3fa177f 100644 --- a/examples/applet/src/window.rs +++ b/examples/applet/src/window.rs @@ -135,6 +135,7 @@ impl cosmic::Application for Window { "test", self.popup.is_some(), |a| Message::Surface(a), + None )) } diff --git a/src/applet/mod.rs b/src/applet/mod.rs index cf2b41b..8f8cbfc 100644 --- a/src/applet/mod.rs +++ b/src/applet/mod.rs @@ -225,6 +225,7 @@ impl Context { tooltip: impl Into>, has_popup: bool, on_surface_action: impl Fn(crate::surface::Action) -> Message + 'static, + parent_id: Option, ) -> crate::widget::wayland::tooltip::widget::Tooltip<'a, Message, Message> { let window_id = *TOOLTIP_WINDOW_ID; let subsurface_id = TOOLTIP_ID.clone(); @@ -243,7 +244,7 @@ impl Context { }; SctkPopupSettings { - parent: window::Id::RESERVED, + parent: parent_id.unwrap_or(window::Id::RESERVED), id: window_id, grab: false, input_zone: Some(Rectangle::new(