Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTK: refactor headerbar into separate Adwaita & GTK structs #4850

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

jcollie
Copy link
Collaborator

@jcollie jcollie commented Jan 9, 2025

There's one behavioral change here. Before this patch, if gtk-titlebar=false we never created a headerbar. This explicitly contradicted the comments in the source, and the documentation for gtk-titlebar imply that if a window starts out without a titlebar it can be brought back later with the toggle_window_decorations keybind action.

After this patch, a headerbar is always created, but if gtk-titlebar=false or window-decoration=false it's immediately hidden.

I'm not sure how this interacts with the current SSD/CSD detection that seems to happen when running Ghostty on non-Gnome DEs so it'll be important to get #4724 merged (plus any follow ups) to enable more explicit control of SSD/CSD.

Copy link
Collaborator

@tristan957 tristan957 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this! I agree that checking with the SSD/window manager folks would be good before merging this PR.

Copy link
Contributor

@pluiedev pluiedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think unconditionally adding the headerbar would be a problem — as long as it is invisible

src/apprt/gtk/headerbar_adw.zig Outdated Show resolved Hide resolved
src/apprt/gtk/headerbar.zig Outdated Show resolved Hide resolved
@jcollie jcollie force-pushed the gtk-headerbar-refactor branch from b92e566 to 010f4d1 Compare January 10, 2025 19:46
@mitchellh mitchellh merged commit c4ece2a into ghostty-org:main Jan 10, 2025
24 checks passed
@mitchellh
Copy link
Contributor

Like the refactor, trusting you on behavior. Thanks!

@github-actions github-actions bot added this to the 1.1.0 milestone Jan 10, 2025
@jcollie jcollie deleted the gtk-headerbar-refactor branch January 10, 2025 21:17
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.

4 participants