wayland: Show client-side decorations when compositor doesn't provide server-side
With the default Debian 13 GNOME Wayland, the compositor does not provide server side window decorations.
Previously, WezTerm would:
- Request server-side decorations for window_decorations = "TITLE | RESIZE"
- Hide client-side frame assuming the request would be honored
- Never check if compositor actually provided server-side decorations
This resulted in windows with no decorations on Gnome, which always responds with client-side decoration mode.
Now we check the decoration_mode field in WindowConfigure events and:
- Show client-side frame if user wants decorations AND compositor sets client-side mode
- Hide frame immediately if compositor provides server-side OR user set window_decorations = "NONE"
- Defer showing frame until we have valid dimensions
This respects both the user's preference and the compositor's capabilities.
Am I correct is guessing that this fixes the regressions wezterm has seen where you cannot resize/drag? Or is this simply a fallback when that happens so that some functionality remains?
Am I correct is guessing that this fixes the regressions wezterm has seen where you cannot resize/drag? Or is this simply a fallback when that happens so that some functionality remains?
I was focussing mostly on title bar. I have noticed that resizing is a not working great (I this is mostly that the mouse pointer is not changing), but really I was waiting to see what happens with this PR before I investigate further.
Have you seen the work started at https://github.com/wezterm/wezterm/pull/7095 ? Afaiu it aims to fix tje situation for Wayland regarding the titlebar + resize