wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

wayland: Show client-side decorations when compositor doesn't provide server-side

Open andrewcarson opened this issue 2 months ago • 3 comments

With the default Debian 13 GNOME Wayland, the compositor does not provide server side window decorations.

Previously, WezTerm would:

  1. Request server-side decorations for window_decorations = "TITLE | RESIZE"
  2. Hide client-side frame assuming the request would be honored
  3. 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.

andrewcarson avatar Nov 09 '25 17:11 andrewcarson

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?

RoloEdits avatar Dec 05 '25 09:12 RoloEdits

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.

andrewcarson avatar Dec 07 '25 09:12 andrewcarson

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

bew avatar Dec 07 '25 11:12 bew