-
Notifications
You must be signed in to change notification settings - Fork 689
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: window border is not removed if window-decoration
is false
#2023
Comments
Hm, I could use a GTK expert on this one. We have to create the titlebar for toggling window decorations to work, adding it later didn't work in my testing (but could be a skill issue). Should we update the docs here? |
Reading the GTK documentation, it isn't clear how the two properties interact. What is the benefit of having separate |
There are four different states, so two bits make sense. The naming of the options seems wrong though. window-decoration, gtk-titlebar
|
The issue is that we want to provide For that reason, I'm leaning towards updating the docs that this may include a border unless BOTH are false. |
To match the documentation and parameter names I would say that gtk-titlebar=false should mean state 2 (in my last post) and window-decoration=false should mean state 4 (irrespective of gtk-titlebar). State 3 is pretty useless I'd say. |
Fixes #2023 Fixes regression from #2051 #2051 introduced a regression where `window-decoration=false` had no effect when libadwaita was in use. Further, the `toggle_window_decorations` keybinding also had no effect whatsoever. This commit fixes this and #2023 by explicitly hiding the header bar when window decorations are disabled. We hide the header bar rather than the full top bar because we still want the tab bar to show up with window decorations disabled.
I believe this will be fixed with #2222. If someone could confirm that'd be great. It wasn't my intention to fix this issue with that PR but it may work. If it didn't work then please comment and I'll reopen. |
@mitchellh, I still can reproduce the same behavior in debug build at The main confusion here for me is that |
Got it. Yeah I think we need to fix this with docs because it appears to just be a silly GTK quirk and potentially theme dependent too. |
window-decoration
is false
window-decoration
is false
Confirmed that this is still happening, but they do go away with:
|
I'm having similar issue using Arch and Qtile WM. It looks like if I comment out I'm assuming that |
Same here actually.
…On Wed, 1 Jan 2025, 21:44 Jonas Hietala, ***@***.***> wrote:
As of today (1.0.2-main+60611b8a) I can no longer disable borders with
window-decoration nor gtk-titlebar:
window-decoration = false
gtk-titlebar = false
border.png (view on web)
<https://github.com/user-attachments/assets/4db51fd5-1f0a-495a-b383-56188f39cd83>
gtk-titlebar doesn't seem to have any effect anymore.
—
Reply to this email directly, view it on GitHub
<#2023 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANPFTKKAHXZ3YOLV4KZGPJD2IRHTNAVCNFSM6AAAAABL2EWQK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRXGE2DAOBUGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
See #4224 |
Thank you, |
Small problem. With
Description: The top window shows I think the following should all be configurable by the user:
Ideal config:
Or
The only difference in the above configs would be the layout/rounding/highlighting of the tab bar (Adwaita layout vs vanilla GTK layout), with both using the same colors. I suppose this could help get what I want - #4089 - But still leaving my opinions here in case others feel the same |
Yes, this is expected behavior, and is documented as such. Please read the documentation. |
Right, I have done so. I'm posting because my desired behavior is not currently supported, and it's related to this issue. As discussed in this issue and #4224 the gtk window border is shown unless you set I'm stating that setting I wanted to post my comment in response to this - #4224 (comment) - However, with that discussion being listed as "Answered" I feel that it may not get attention from the appropriate people; that's why I posted here. I doubt I am the only person who wants to be able to remove the border while also having their set GTK theme respected. Maybe I am now, with Ghostty being recently made public, but over time there will be others with the same gripe. I use a non-Adwaita GTK theme. I don't think it's unreasonable to expect to be able to use my set GTK theme without being forced onto another theme (Adwaita) that doesn't fit the rest of my environment. Should I post this in the other discussion? Open a new discussion? Give up on any hope of Ghostty being able to be configured as desired and go back to another terminal emulator? |
Here's a screenshot of another GTK application that respects my set theme Just to confirm that the issue is unrelated to my set theme. Edit: I have "resolved" this by copying my gtk theme from the globally installed location to |
Using Adwaita has pros and cons, and is something that every user must balance for their own sake. Reworking the Adwaita theme to meet expectations that it is not meant for is not something that I would advocate for within Ghostty. |
Yes, I agree that adwaita behavior shouldn't be modified. I'm saying that when adwaita is disabled, it should use the globally-set GTK theme, and in my case, it doesn't unless the theme is installed locally for the user (which is not necessary for other GTK applications that I utilize) |
We're going to explore the use of some Wayland protocols to enable server-side decorations if we're not running on Gnome. So it may be possible to keep Adwaita and have server-side decorations. No promises, this is at the concept stage and very experimental and probably won't make 1.0.2. |
We are not doing anything that would preclude GTK from picking up your theme if adwaita is disabled. |
What about people using X11? |
That's what I would have assumed, but it doesn't explain why other GTK apps didn't require my theme to be installed per-user |
We have experienced volunteers doing good work pursuing Wayland improvements and don’t presently have the same enthusiasm for X11. I’m not against it at all, it’s just the present state of contribution. |
For what it's worth, I'm on X11 and was able to hide borders with the following config when I was on commit
I just upgraded to commit I don't have the ability to help with code at the moment but I'm happy to be a test subject at least 😆 Some of my system details in case it's helpful: |
With Ghostty 1.1.0 the borders are still present. With If I add Edit: This is on Void Linux with X11. |
This is fundamentally because libadwaita adds a slight outline to all windows and there's no easy way to disable that aside from custom CSS. The actual fix itself is very simple, but I'm not sure if we want to include this as a part of our SSD styling: .window {
outline-width: 0px;
} EDIT: Looks like there's actually a bug on our end. We're applying CSD styling even when we're using SSDs. |
I still have this issue even after the fix was merged. I managed to fix mine by adding custom CSS to my ghostty config
|
On current
main
(4cf6202) window border is not removed withwindow-decoration=false
but it is removed withgtk-titlebar=false
.I've bisected the behavior change to 2d7baaa (i.e. #1950).
As documentation says that both titlebar and borders should be disabled when
window-decoration=false
, I am not sure if this is an issue with documentation or code.OS: Linux
Window manager: i3
Screenshots:
ghostty
(with default config):ghostty --window-decoration=false
:ghostty --gtk-titlebar=false
:The text was updated successfully, but these errors were encountered: