Sync maximized state from top-level configure event for a wayland window (#11003)

* Otherwise is_maximized always returns `true`



Release Notes:

- Fixed maximized state. Tested with a dummy maximize/restore button
with the `zoom()` (not implemented yet). Without the right `maximized`,
in toggle zoom function is not possible to call `set_maximized()` or
`unset_maximized()`.

```rust
    fn zoom(&self) {
      if self.is_maximized() {
        self.borrow_mut().toplevel.unset_maximized();
      } else {
        self.borrow_mut().toplevel.set_maximized();
      }
    }
```
This commit is contained in:
Akilan Elango 2024-04-27 02:33:19 +05:30 committed by GitHub
parent 11dc3c2582
commit 7bd18fa653
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -322,7 +322,7 @@ impl WaylandWindowStatePtr {
self.resize(width, height);
self.set_fullscreen(fullscreen);
let mut state = self.state.borrow_mut();
state.maximized = true;
state.maximized = maximized;
false
}