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

fix: gtk titlebar being restored if it shouldn't be #5090

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aw1875
Copy link
Contributor

@aw1875 aw1875 commented Jan 15, 2025

I feel like we should be respecting the value of gtk-titlebar in the gtkWindowNotifyMaximized callback as mentioned in discord (https://discord.com/channels/1005603569187160125/1005603569711452192/1328976978094723163)

Would close #5262

@aw1875 aw1875 force-pushed the RespectGTKTitlebarConf branch from b1f8a43 to b0505c4 Compare January 15, 2025 07:18
@aw1875 aw1875 force-pushed the RespectGTKTitlebarConf branch from b0505c4 to 65cf5c7 Compare January 15, 2025 07:24
@aw1875
Copy link
Contributor Author

aw1875 commented Jan 15, 2025

Just a note from the discussion that this PR may not be relevant at this point, but I just wanted to get this put together in case it is

@rudrabhoj
Copy link

Tested these commits on Gentoo with Hyrland. This resolves the problem on the fullscreen mode.

@jcollie
Copy link
Collaborator

jcollie commented Jan 22, 2025

I feel that we should not be changing Ghostty's behavior with respect to gtk-titlebar and window-decoration until we update the documentation surrounding these configuration entries (perhaps adding/modifying options in the process). In particular here are the last two lines of the gtk-titlebar documentation that indicate that gtk-titlebar doesn't have any effect after initial window creation. This patch also does not take into account situations when window-decoration might affect the display of the titlebar.

Everyone seems to want to modify the behavior to suit their particular interpretation of what gtk-titlebar should mean and how it interacts with window-decoration. We need to put more work first in clarifying the documentation so that everyone agrees on the interpretation and it's possible to clearly specify a user's wishes.

For example, there is no documented way currently to turn off window decorations (rounded corners and drop shadows) and keep the GTK titlebar.

ghostty/src/config/Config.zig

Lines 2069 to 2078 in ddf7173

/// When enabled, the full GTK titlebar is displayed instead of your window
/// manager's simple titlebar. The behavior of this option will vary with your
/// window manager.
///
/// This option does nothing when `window-decoration` is false or when running
/// under macOS.
///
/// Changing this value at runtime and reloading the configuration will only
/// affect new windows.
@"gtk-titlebar": bool = true,

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.

GTK: Titlebar Reappears When Maximizing and Minimizing Ghostty Window to Normal
3 participants