Skip to content

Support hide_window_decorations titlebar-only on Wayland#9486

Open
antoinecellerier wants to merge 1 commit intokovidgoyal:masterfrom
antoinecellerier:titlebar-only-wayland
Open

Support hide_window_decorations titlebar-only on Wayland#9486
antoinecellerier wants to merge 1 commit intokovidgoyal:masterfrom
antoinecellerier:titlebar-only-wayland

Conversation

@antoinecellerier
Copy link

Hide the CSD titlebar subsurface while keeping shadow borders for resizing. On SSD compositors (GNOME), forces CSD mode to draw kitty's own shadows without a titlebar.

Manually tested on the following:

  • GNOME Shell: 49.3
  • Wayland: 1.24.0 (libwayland-client)

This PR was authored by GitHub Copilot / Opus 4.6. I'm not familiar with the kitty code base nor wayland window compositing but reading through the changes they feel reasonable. If you feel this is garbage, please let me know :)

@kovidgoyal
Copy link
Owner

What manual testing did you do? In particular the main source of issues
with CSD is switching between full screen/docked/normal window modes.
Also what happens with right clicks in the shadow area?
Did you test what happens on an SSD supporting compositor?

If a value of titlebar-only disables SSD then a value of yes should
disable SSD too, if it doesnt already, dont remember. And the docs of
the option should mention that.

Finally update the changelog with an entry for this.

I am rather busy at the moment, with a whole queue of AI generated PRs
to review so it will be some time before I can actually look at the code
in your PR.

@antoinecellerier
Copy link
Author

I've mostly tested keyboard based resizing/tiling, mouse based resizing, changing the config vague and reloading (no effect). This is the list of scenarios copilot had come up with for me to validate:

  1. Shadows visible around the window edges with titlebar-only
  2. No titlebar — no title text, no close/maximize/minimize buttons
  3. Resize handles work — drag the shadow edges to resize
  4. Alt+drag (or Super+drag on GNOME) still moves the window
  5. Fullscreen (Ctrl+Shift+F11) hides shadows, exiting restores them

My understanding is that my Gnome / Wayland setup uses SSD but I'm trusting AI on this one ...

Let me check the other items and add missing docs / changelog entries to the pr.

@antoinecellerier
Copy link
Author

I've validated right clicking in the shadow area doesn't do anything & added extra doc and changelog entries. Happy to run any other tests if useful. thanks

Hide the CSD titlebar subsurface while keeping shadow borders for
resizing. On SSD compositors (GNOME), forces CSD mode to draw
kitty's own shadows without a titlebar.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kovidgoyal
Copy link
Owner

I'm confused. GNOME is almost unique amongst Wayland compositors for not supporting SSD. This needs to be tested on something like kwin or niri or sway or hyprland that do support SSD. Does using CSD there via this options cause any issues? Does setting this option to yes also force usage of CSD or does that happen for titlebar-only?

@antoinecellerier
Copy link
Author

Got it. maybe Opus was misrepresenting things to me. Will test it one one of those other options and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants