wayland: Fix window state issues (#13885)

Fixes some issues with the CSD added in
https://github.com/zed-industries/zed/pull/13611

Here's a video comparing the master branch (yellow icon) with this PR
(blue icon):


https://github.com/zed-industries/zed/assets/71973804/35be443a-8f24-4aed-910b-625bad9821e2

_Note: the flicker at the bottom of the window when maximizing is an
issue with the KDE floating task bar, it happens with all programs._

Release Notes:

- N/A
5c7e6b7effapricotbucket28 committed on 7/5/2024, 8:42:11 PM· committed by GitHubparent1c1fd6a
4 files changedLine totals unavailable