wl_surface: set output to dummy when unmapping
This commit is contained in:
parent
d461933a8c
commit
fa69f89f39
4 changed files with 13 additions and 2 deletions
|
|
@ -906,6 +906,12 @@ impl WlSurface {
|
||||||
|
|
||||||
fn unset_ext(&self) {
|
fn unset_ext(&self) {
|
||||||
self.ext.set(self.client.state.none_surface_ext.clone());
|
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) {
|
fn calculate_extents(&self, propagate: bool) {
|
||||||
|
|
|
||||||
|
|
@ -433,6 +433,11 @@ impl XdgSurface {
|
||||||
f(&popup.popup);
|
f(&popup.popup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn unset_ext(&self) {
|
||||||
|
self.ext.set(None);
|
||||||
|
self.surface.set_dummy_output();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl XdgSurfaceRequestHandler for XdgSurface {
|
impl XdgSurfaceRequestHandler for XdgSurface {
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ impl XdgPopupRequestHandler for XdgPopup {
|
||||||
|
|
||||||
fn destroy(&self, _req: Destroy, _slf: &Rc<Self>) -> Result<(), Self::Error> {
|
fn destroy(&self, _req: Destroy, _slf: &Rc<Self>) -> Result<(), Self::Error> {
|
||||||
self.destroy_node();
|
self.destroy_node();
|
||||||
self.xdg.ext.set(None);
|
self.xdg.unset_ext();
|
||||||
self.xdg.surface.client.remove_obj(self)?;
|
self.xdg.surface.client.remove_obj(self)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ impl XdgToplevelRequestHandler for XdgToplevel {
|
||||||
|
|
||||||
fn destroy(&self, _req: Destroy, _slf: &Rc<Self>) -> Result<(), Self::Error> {
|
fn destroy(&self, _req: Destroy, _slf: &Rc<Self>) -> Result<(), Self::Error> {
|
||||||
self.tl_destroy();
|
self.tl_destroy();
|
||||||
self.xdg.ext.set(None);
|
self.xdg.unset_ext();
|
||||||
{
|
{
|
||||||
let mut children = self.children.borrow_mut();
|
let mut children = self.children.borrow_mut();
|
||||||
let parent = self.parent.get();
|
let parent = self.parent.get();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue