From 7bd18fa6539abf1c369692f8cbe8d6501d00b50a Mon Sep 17 00:00:00 2001 From: Akilan Elango Date: Sat, 27 Apr 2024 02:33:19 +0530 Subject: [PATCH] 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(); } } ``` --- crates/gpui/src/platform/linux/wayland/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/platform/linux/wayland/window.rs b/crates/gpui/src/platform/linux/wayland/window.rs index 2b1b8d1c7fb9bcb1e76fa980a9736e4bb23205ca..82bfa6c0a8dd3c7f56613915b3b31748ec2589de 100644 --- a/crates/gpui/src/platform/linux/wayland/window.rs +++ b/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 }