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

Double window controls in some CSD applications #32

Open
lah7 opened this issue Mar 21, 2021 · 16 comments
Open

Double window controls in some CSD applications #32

lah7 opened this issue Mar 21, 2021 · 16 comments
Labels
help wanted Any C programmers out there?

Comments

@lah7
Copy link
Owner

lah7 commented Mar 21, 2021

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 older 3.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
gnome-disks-40

3.38.2
gnome-disks-3 38 2

Environment

  • OS: EndeavourOS
  • Desktop Environment: KDE
  • gtk3-classic Version: 3.24.27
@lah7 lah7 added help wanted Any C programmers out there? patch needs work Existing patch can be enhanced labels Mar 21, 2021
@lah7 lah7 changed the title [gnome-disk-utility] Double window controls in CSD [gnome-disk-utility/simple-scan] Double window controls in CSD Mar 26, 2021
@lah7 lah7 changed the title [gnome-disk-utility/simple-scan] Double window controls in CSD Double window controls in some CSD applications Mar 26, 2021
@lah7
Copy link
Owner Author

lah7 commented Mar 26, 2021

Likewise, simple-scan 40.0 inhibits the same problem: double controls, and black border.

40.0

Screenshot_20210326_114039
Screenshot_20210326_114150

3.38.5

Screenshot_20210326_114407
Screenshot_20210326_114413

@lah7 lah7 added the patch bug A problem as a result of one of the patches label Mar 26, 2021
@MR-Diamond
Copy link

Also gnome-calculator 40.0

@wb9688
Copy link

wb9688 commented Apr 18, 2021

My guess would be that those are the apps using libhandy's HdyWindow and HdyHeaderBar and that that causes this behavior.

@ZaWertun
Copy link
Contributor

Just fixed similar bug in my fork of gtk3-nocsd: https://github.com/ZaWertun/gtk3-nocsd/tree/test/libhandy.
Some screenshots:
изображение
изображение

@simifor
Copy link
Contributor

simifor commented Jul 27, 2021

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.

lah7 added a commit that referenced this issue Jul 28, 2021
Addresses #32.

Co-authored-by: simifor <70454800+simifor@users.noreply.github.com>
Co-authored-by: Yaroslav Sidlovsky <zawertun@gmail.com>
@lah7
Copy link
Owner Author

lah7 commented Jul 28, 2021

Thank you @simifor, your patch.txt made it very easy to incorporate into the quilt patch system. Committed as 12f90e2

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. 😅

@N0rbert
Copy link
Contributor

N0rbert commented Jan 2, 2022

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.

@lah7
Copy link
Owner Author

lah7 commented Jan 3, 2022

I noticed CSD applications under patched Ubuntu 21.10 doesn't look great, depending on the theme:

Screenshot_20220103_183047
Screenshot_20220103_183118
Screenshot_20220103_183138

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.

@lah7 lah7 added the needs investigating More details required on what needs to be done label Apr 1, 2022
@daemonspudguy
Copy link

I also noticed this with the program Pamac on Arch Linux.

@servimo
Copy link

servimo commented May 19, 2022

I have this with EasyEffects on Manjaro too.

@steven2024
Copy link

The same bug happens on gedit.
image

@bayazidbh
Copy link

bayazidbh commented Aug 7, 2022

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?

Screenshots

image

image

image

image

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.

@ghost
Copy link

ghost commented Mar 12, 2023

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):

  • Upstream commit that dropped off support for a SSD bar
  • Subsequent later commits switched over to using libhandy (a CSD UI library that operates on top of GTK)

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).

@probonopd
Copy link

probonopd commented Jul 24, 2023

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.

@lah7
Copy link
Owner Author

lah7 commented Jul 25, 2023

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.

@probonopd
Copy link

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.

@lah7 lah7 removed patch bug A problem as a result of one of the patches patch needs work Existing patch can be enhanced needs investigating More details required on what needs to be done labels Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Any C programmers out there?
Projects
None yet
Development

No branches or pull requests