shell: Fix closed x11 windows closing stacks
This commit is contained in:
parent
bc3c304b12
commit
8038034a62
1 changed files with 7 additions and 2 deletions
|
|
@ -200,6 +200,7 @@ impl XwmHandler for Data {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn unmapped_window(&mut self, _xwm: XwmId, window: X11Surface) {
|
fn unmapped_window(&mut self, _xwm: XwmId, window: X11Surface) {
|
||||||
|
let surface = CosmicSurface::X11(window.clone());
|
||||||
if window.is_override_redirect() {
|
if window.is_override_redirect() {
|
||||||
self.state
|
self.state
|
||||||
.common
|
.common
|
||||||
|
|
@ -210,7 +211,7 @@ impl XwmHandler for Data {
|
||||||
.state
|
.state
|
||||||
.common
|
.common
|
||||||
.shell
|
.shell
|
||||||
.element_for_surface(&CosmicSurface::X11(window.clone()))
|
.element_for_surface(&surface)
|
||||||
.cloned()
|
.cloned()
|
||||||
.and_then(|element| {
|
.and_then(|element| {
|
||||||
self.state
|
self.state
|
||||||
|
|
@ -220,7 +221,11 @@ impl XwmHandler for Data {
|
||||||
.map(|space| (element, space))
|
.map(|space| (element, space))
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
space.unmap(&element);
|
if element.is_stack() && element.stack_ref().unwrap().len() >= 2 {
|
||||||
|
element.stack_ref().unwrap().remove_window(&surface);
|
||||||
|
} else {
|
||||||
|
space.unmap(&element);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let outputs = if let Some(wl_surface) = window.wl_surface() {
|
let outputs = if let Some(wl_surface) = window.wl_surface() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue