1
0
Fork 0
forked from wry/wry

Merge pull request #701 from mahkoh/jorth/unset-output

wl_surface: set output to dummy when unmapping
This commit is contained in:
mahkoh 2025-12-20 19:55:19 +01:00 committed by GitHub
commit 867172f20b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 2 deletions

View file

@ -906,6 +906,12 @@ impl WlSurface {
fn unset_ext(&self) {
self.ext.set(self.client.state.none_surface_ext.clone());
self.set_dummy_output();
}
fn set_dummy_output(&self) {
let dummy_output = self.client.state.dummy_output.get().unwrap();
self.set_output(&dummy_output, NodeLocation::Output(dummy_output.id));
}
fn calculate_extents(&self, propagate: bool) {

View file

@ -433,6 +433,11 @@ impl XdgSurface {
f(&popup.popup);
}
}
fn unset_ext(&self) {
self.ext.set(None);
self.surface.set_dummy_output();
}
}
impl XdgSurfaceRequestHandler for XdgSurface {

View file

@ -229,7 +229,7 @@ impl XdgPopupRequestHandler for XdgPopup {
fn destroy(&self, _req: Destroy, _slf: &Rc<Self>) -> Result<(), Self::Error> {
self.destroy_node();
self.xdg.ext.set(None);
self.xdg.unset_ext();
self.xdg.surface.client.remove_obj(self)?;
Ok(())
}

View file

@ -256,7 +256,7 @@ impl XdgToplevelRequestHandler for XdgToplevel {
fn destroy(&self, _req: Destroy, _slf: &Rc<Self>) -> Result<(), Self::Error> {
self.tl_destroy();
self.xdg.ext.set(None);
self.xdg.unset_ext();
{
let mut children = self.children.borrow_mut();
let parent = self.parent.get();