Open lah7 opened 3 years ago
Likewise, simple-scan
40.0 inhibits the same problem: double controls, and black border.
Also gnome-calculator 40.0
My guess would be that those are the apps using libhandy's HdyWindow
and HdyHeaderBar
and that that causes this behavior.
Just fixed similar bug in my fork of gtk3-nocsd: https://github.com/ZaWertun/gtk3-nocsd/tree/test/libhandy. Some screenshots:
I looked at @ZaWertun's last commit, then browsed a bit gtk's tree to see where it'd and made a patch patch.txt full credits to zawertun really. This only fixes the black outlines seen in some places, as I didn't even touch the CSD related commits.
Thank you @simifor, your patch.txt
made it very easy to incorporate into the quilt patch system. Committed as 12f90e216bd894b27cfedc5b1eb918fd7cae4811
Thank you to @ZaWertun as well. I'm a bit lost on which commits to incorporate by looking at gtk3-nocsd
's repository. Any help is much appreciated if anyone wishes to create a patch for this repository to fix this regression. I get confused with quilt
too. 😅
Great! Thanks for merging.
I think, we need to skip/disable both csd__clean-headerbar.patch
and csd__disabled-by-default.patch
temporarily for Ubuntu MATE 21.10 impish deb-packages to get GNOME native apps look better here, so without double borders.
I noticed CSD applications under patched Ubuntu 21.10 doesn't look great, depending on the theme:
For Ubuntu 21.10 users, I will revert those patches in the packaging since they ship newer (40.x) GNOME apps. Just until the "new" CSD is fixed, pull requests much appreciated!
Edit: In 22.04, this returns to using the default patchset, so double controls are expected.
I also noticed this with the program Pamac on Arch Linux.
I have this with EasyEffects on Manjaro too.
The same bug happens on gedit.
It seems to not be all, as I noticed that Lutris and FSearch (when CSD is enabled) doesn't have that issue while Komikku and Pamac has them. Potentially because of some hardcoded settings in their CSD setup?
For now the only thing that can be done is to just use GTK_CSD=
set to 0
or 1
. Which isn't an issue with those two apps I use, as I don't need the KDE window decoration features often with them and it's just an eyesore when not maximized.
Edit: For now the other thing that can be done is by manually changing gtk-decoration-layout=
to :menu,appmenu
in ~/.config/gtk-3.0/settings.ini
though I don't know if this would be fine outside of KDE or not.
TL;DR: Application upstream design issue (not GTK)
I can't speak to all the examples given, but just analyzing the OP application (gnome-disk-utility):
I imagine (as most of the other examples are GNOME apps) that they did a similar switch to libhandy. In this case there's little we can do with a patched GTK to solve this issue (as libhandy is building the title bar and has no such checks to skip doing so on SSD or classic-style distributions).
Opened an upstream issue: https://gitlab.gnome.org/GNOME/libhandy/-/issues/470
Please consider upvoting that upstream issue if you agree that this should be fixed in libhandy.
I think the next course of action is to have a separately patched libhandy
package that removes the CSD window buttons.
Personally I'm not up for maintaining that, but I'll happily link if anyone comes up with an AUR package for the offending library.
Upstream says:
Even if I was interested in supporting that thing (I'm not), there's no way to do it from libhandy in the first place as it has no idea about any patches your GTK may or may not have. This isn't something that's possible to "support". It's like asking a website to support a user style better.
At least we have asked.
Bug Description
gnome-disk-utility 40.0
shows double window controls: the actual window controls and a duplicate within the application. There is also a black border on the right/bottom.The latest
gtk3-classic
against the older3.38.2
does not inhibit the problem, so the GNOME developers made a change in their code.Thankfully, it is still a GTK3 application and not GTK4, despite the versioning.
Expected Behaviour
The window controls inside the application should be hidden.
Workaround
Downgrade and pin the older version.
Screenshots
40.0
3.38.2
Environment