浏览代码

desktop app saves window position fix (#2730)

* desktop app saves window position fix

* debug cfg

* cargo fmt
Adam Kundrát 11 月之前
父节点
当前提交
23dfe39bdf
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      packages/desktop/src/app.rs

+ 3 - 0
packages/desktop/src/app.rs

@@ -175,6 +175,9 @@ impl App {
 
         match self.window_behavior {
             LastWindowExitsApp => {
+                #[cfg(debug_assertions)]
+                self.persist_window_state();
+
                 self.webviews.remove(&id);
                 if self.webviews.is_empty() {
                     self.control_flow = ControlFlow::Exit