wayland: Update to xdg-decoration protocol
Updated version of !2191; as such, I've copied basically everything, modifying it as best I can to fit with the suggestions by @jadahl in the last PR.
Currently gtk uses the out of date and non-standardized server-decoration protocol from kde. This commit replaces the implementation of this old server-decoration protocol with an implementation of the xdg-decoration protocol standardized in the wayland-protocols repository.
The new protocol allows us to specify a preference, and so we always ask for CSD and initially enable CSD, only switching to SSD if the server disregards our preference.
Notable changes include:
- A new GDK window state for SSD.
- Deprecation of gdk_wayland_display_prefers_ssd(). The new protocol doesn't provide global state, so this function is deprecated and always returns false.
- Renaming of gdk_wayland_window_announce_csd/ssd() to gdk_wayland_window_request_csd/ssd(). The semantics have changed with the new protocol and the old names are not merely wrong but misleading.
Notable changes include:
-
New private GDK API to communicate decoration state changes to GTK
-
Deprecation of gdk_wayland_display_prefers_ssd(). The new protocol doesn't provide global state, so this function is deprecated and always returns false.
-
Renaming of gdk_wayland_window_announce_ssd() to gdk_wayland_window_request_ssd(). The server is not required to honor requests for ssd. It is however required to honor CSD if the xdg-decoration protocol object is destroyed. so gdk_wayland_window_announce_csd() is still an accurate name.
Signed-off-by: Dallas Strouse dastrouses@gmail.com Co-authored-by: Isaac Freund mail@isaacfreund.com