windows: Avoid recording minimized position to database (#9407)

Minimizing window records strange position to DB. When Zed is restarted,
the window goes far away.
<img width="975" alt="image"
src="https://github.com/zed-industries/zed/assets/6465609/98dbab71-fdbb-4911-b41a-9c3e498e5478">

So I fixed.

Release Notes:

- N/A
This commit is contained in:
白山風露
2024-03-21 09:15:16 -07:00
committed by GitHub
parent f88f1bce20
commit f179158913
8 changed files with 40 additions and 11 deletions
+1 -1
View File
@@ -754,7 +754,7 @@ impl Workspace {
cx.background_executor()
.spawn(DB.set_fullscreen(workspace_id, true))
.detach_and_log_err(cx);
} else {
} else if !cx.is_minimized() {
cx.background_executor()
.spawn(DB.set_fullscreen(workspace_id, false))
.detach_and_log_err(cx);