1
0
Fork 0
forked from wry/wry

tree: don't make xdg-popup visible if parent is not visible

This commit is contained in:
Julian Orth 2025-05-14 17:53:16 +02:00
parent 25848be92f
commit f00b8075e0
4 changed files with 20 additions and 0 deletions

View file

@ -44,6 +44,7 @@ pub trait XdgPopupParent {
fn output(&self) -> Rc<OutputNode>;
fn has_workspace_link(&self) -> bool;
fn post_commit(&self);
fn visible(&self) -> bool;
fn tray_item(&self) -> Option<TrayItemId> {
None
}
@ -369,6 +370,13 @@ impl StackedNode for XdgPopup {
}
fn stacked_set_visible(&self, visible: bool) {
if visible {
if let Some(parent) = self.parent.get() {
if !parent.visible() {
return;
}
}
}
self.set_visible(visible);
}