Fix showing unsupported window controls on Linux Wayland (#50609)

Release Notes:

- Fixed showing unsupported window controls on Linux Wayland

Before:
<img width="207" height="84" alt="image"
src="https://github.com/user-attachments/assets/174d3488-7c40-4b36-a1b5-76b85e19b796"
/>

After:
<img width="185" height="90" alt="image"
src="https://github.com/user-attachments/assets/82f10cbb-a834-4db9-a8e7-9e5156b3397e"
/>

Co-authored-by: Ben Kunkle <ben@zed.dev>
This commit is contained in:
Moulberry 2026-04-24 18:10:12 +08:00 committed by GitHub
parent 89d2dcebba
commit 4d668fa368
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -774,7 +774,12 @@ impl WaylandWindowStatePtr {
}
}
xdg_toplevel::Event::WmCapabilities { capabilities } => {
let mut window_controls = WindowControls::default();
let mut window_controls = WindowControls {
maximize: false,
minimize: false,
fullscreen: false,
window_menu: false,
};
let states = extract_states::<xdg_toplevel::WmCapabilities>(&capabilities);