Skip to content

Commit

Permalink
fix(window-state): saving a minimized window's state changes its posi…
Browse files Browse the repository at this point in the history
…tion to -32000 (#1702)

* Don't store position on minimized

* Add change file

* ?
  • Loading branch information
Legend-Master authored Sep 2, 2024
1 parent de732d0 commit 17e8014
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-restore-minimized-window-position.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"window-state": patch
---

Fix saving a minimized window's state changes its position to -32000
2 changes: 1 addition & 1 deletion plugins/window-state/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ impl<R: Runtime> WindowExtInternal for Window<R> {
}
}

if flags.contains(StateFlags::POSITION) && !is_maximized {
if flags.contains(StateFlags::POSITION) && !is_maximized && !self.is_minimized()? {
let position = self.outer_position()?;
state.x = position.x;
state.y = position.y;
Expand Down

0 comments on commit 17e8014

Please sign in to comment.