1
0
Fork 0
forked from wry/wry

cli: add commands to inspect the tree

This commit is contained in:
Julian Orth 2025-05-06 18:08:14 +02:00
parent bd04b09171
commit 38d7a60d00
14 changed files with 1072 additions and 8 deletions

View file

@ -328,6 +328,12 @@ impl XdgSurface {
popup.popup.xdg.set_popup_stack(stack);
}
}
pub fn for_each_popup(&self, mut f: impl FnMut(&Rc<XdgPopup>)) {
for popup in self.popups.lock().values() {
f(&popup.popup);
}
}
}
impl XdgSurfaceRequestHandler for XdgSurface {

View file

@ -382,6 +382,10 @@ impl StackedNode for XdgPopup {
fn stacked_absolute_position_constrains_input(&self) -> bool {
false
}
fn stacked_is_xdg_popup(&self) -> bool {
true
}
}
impl XdgSurfaceExt for XdgPopup {

View file

@ -210,6 +210,12 @@ impl ZwlrLayerSurfaceV1 {
m.layer_surface.get_or_insert_default_ext()
})
}
pub fn for_each_popup(&self, mut f: impl FnMut(&Rc<XdgPopup>)) {
for popup in self.popups.lock().values() {
f(&popup.popup);
}
}
}
impl ZwlrLayerSurfaceV1RequestHandler for ZwlrLayerSurfaceV1 {