Fix window startup closing
This commit is contained in:
parent
6a5839a93e
commit
01da512231
1 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ impl App {
|
||||||
fn close_window(&mut self, window_name: &config::WindowName) -> Result<()> {
|
fn close_window(&mut self, window_name: &config::WindowName) -> Result<()> {
|
||||||
let window = self
|
let window = self
|
||||||
.windows
|
.windows
|
||||||
.get(window_name)
|
.remove(window_name)
|
||||||
.context(format!("No window with name '{}' is running.", window_name))?;
|
.context(format!("No window with name '{}' is running.", window_name))?;
|
||||||
window.close();
|
window.close();
|
||||||
self.eww_state.clear_window_state(window_name);
|
self.eww_state.clear_window_state(window_name);
|
||||||
|
@ -76,7 +76,7 @@ impl App {
|
||||||
size: Option<util::Coords>,
|
size: Option<util::Coords>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
// remove and close existing window of the same type
|
// remove and close existing window of the same type
|
||||||
self.windows.remove(window_name).map(|window| window.close());
|
let _ = self.close_window(window_name);
|
||||||
|
|
||||||
let mut window_def = self
|
let mut window_def = self
|
||||||
.eww_config
|
.eww_config
|
||||||
|
|
Loading…
Add table
Reference in a new issue