close windows of same type when a window gets opened
This commit is contained in:
parent
fc02d156b5
commit
d10e98e614
1 changed files with 3 additions and 0 deletions
|
@ -75,6 +75,9 @@ impl App {
|
||||||
pos: Option<util::Coords>,
|
pos: Option<util::Coords>,
|
||||||
size: Option<util::Coords>,
|
size: Option<util::Coords>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
|
// remove and close existing window of the same type
|
||||||
|
self.windows.remove(window_name).map(|window| window.close());
|
||||||
|
|
||||||
let mut window_def = self
|
let mut window_def = self
|
||||||
.eww_config
|
.eww_config
|
||||||
.get_windows()
|
.get_windows()
|
||||||
|
|
Loading…
Add table
Reference in a new issue