close windows of same type when a window gets opened

This commit is contained in:
elkowar 2020-10-13 17:27:59 +02:00
parent fc02d156b5
commit d10e98e614

View file

@ -75,6 +75,9 @@ impl App {
pos: Option<util::Coords>,
size: Option<util::Coords>,
) -> Result<()> {
// remove and close existing window of the same type
self.windows.remove(window_name).map(|window| window.close());
let mut window_def = self
.eww_config
.get_windows()