fix(window-state): restore window state for stubbed zerord state (#1259)

* Restore window state for default state

* Add change file
pull/1263/head
Tony 1 year ago committed by GitHub
parent 04ebd0282e
commit 44e47fe98b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"window-state": patch
---
Fix `restore_window` doesn't work with `skip_initial_state` when no previous cache was found

@ -148,12 +148,10 @@ impl<R: Runtime> WindowExt for Window<R> {
let mut should_show = true; let mut should_show = true;
if let Some(state) = c.get(self.label()) { if let Some(state) = c
// avoid restoring the default zeroed state .get(self.label())
if *state == WindowState::default() { .filter(|state| state != &&WindowState::default())
return Ok(()); {
}
if flags.contains(StateFlags::DECORATIONS) { if flags.contains(StateFlags::DECORATIONS) {
self.set_decorations(state.decorated)?; self.set_decorations(state.decorated)?;
} }

Loading…
Cancel
Save