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
Delete gtk-csd.sh #103
Delete gtk-csd.sh #103
Conversation
This is the cause of elementary/gala#244 Can anyone remember why this is still here and what issues removing it would cause?
I believe it's because we switched to CSD before it was standard, i.e. back in Freya or Loki. If it's now standard I guess that option could be unnecessary and unsupported? |
@cassidyjames Indeed, that would make sense. Although, it looks like @danrabbit already had a stab at removing it a couple of years back and then it got restored for some reason, so that makes me suspicious: 6d6d329 |
I think it might have been something to do with dialog decorations maybe? We should give it a try again and be on the look out for regressions |
@danrabbit could this be why root dialogs don't have the correct decorations? If this isn't set in the root profile or something? |
@cassidyjames oh that's very possible. Like on the greeter for example? |
@danrabbit ah yeah that's another example. But like when running the installer as root, or if you use Files' "Run as Administrator" and then look at a properties dialog. |
Marking this as blocked as it definitely does some weird stuff to dialogs. All dialogs now have a titlebar and it seems it somehow breaks the file/folder chooser completely too. I'll look into these issues and see if there's a middle ground solution. |
So to me it seems like it is an issue with WxWidgets, after investigating, I think that this is cause by https://github.com/wxWidgets/wxWidgets/blob/cc931612eec2e3ea49200ebff45042135f3c3f9c/src/gtk/toplevel.cpp#L350 |
@tintou Yes, the issue wouldn't occur with wxWidgets based apps if they stopped requesting decorations. But I think they possibly have that there as leftover/compatibility with GTK2, so I don't know how open they would be to removing it and it wouldn't fix anything in this cycle anyway. Also, it's not just wxWidgets, there seem to be a number of other apps that do this (including eclipse and MySQL workbench, which is native GTK). |
The other issue that compounds this is that I would assume that some apps might want to request server side decorations for a reason, so forcing CSD on them too with this shell script is how we've ended up with double decorations in some apps. Another option is patching GTK to enable CSD on dialogs even when not using the headerbar action buttons, but I'd guess we wouldn't want to do that either. 🤷♀️ |
@davidmhewitt Ah yes that was the issue. Maybe it's time to revisit with Gtk+. I remember us bringing this up before and the response being "But why would you want CSD without moving the action area too?". I think we probably should pursue a patch upstream that let's us keep using CSD without moving the dialog action area and also not having to have this force CSD script thing. |
It's worth noting that a patched GTK will fix any other unsightly dialog decorations like running files as root and in the greeter session. So this may be worth pursuing for reasons additional to fixing the apps the request and receive double decorations. |
We might just be able to target HeaderBars inside of GtkDialogs with CSS, but should really check if that affects other apps and windows as well. |
@davidmhewitt The headerbar in the dialog should also have the class |
Not necessarily... the Since the dialog is adding its own "custom" headerbar, which granted is exactly the same as the one that |
I have prepared a patch for GTK that adds a new XSettings override option called If we apply this patch, along with dropping the GTK_CSD env var, as per this PR and setting the XSettings overrides to enable this new setting by default, then we resolve the issues around having this shell script still around, with no visible differences to anything. Is this something we'd want to pursue? |
For reference, here is the GTK patch: |
@davidmhewitt That sounds ideal! Have you proposed this patch upstream in the Gtk Gitlab? |
@danrabbit Not yet, I wrote and tested that patch against the version we're running in Juno. I don't understand GTK versioning well enough to know which branch I should propose merging this into in their repository. Anyone have any ideas? |
@davidmhewitt https://gitlab.gnome.org/GNOME/gtk/commits/gtk-3-24 is the latest and last GTK+3 branch |
Upstream merge request opened here: https://gitlab.gnome.org/GNOME/gtk/merge_requests/566 |
Causes various issues when not set * elementary/files#971 * elementary/default-settings#103 * cassidyjames/ideogram#26 However this can cause certain problems in gala * elementary/gala#244
In case it's not obvious how to test this: sudo nano /etc/profile.d/gtk-csd.h Comment out the |
FWIW, the double-window border bug was fixed by wxWidgets v3.0.5 (https://forum.kicad.info/t/fix-available-for-double-window-border-on-elementaryos/22257/8) which is not in the repo's yet, but works when installed manually. |
Fixes #207
Fixes elementary/gala#244
Can anyone remember why this is still here and what issues removing it would cause?