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

Akilan Elango created

* 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();
      }
    }
```

Change summary

crates/gpui/src/platform/linux/wayland/window.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/gpui/src/platform/linux/wayland/window.rs 🔗

@@ -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
             }