On 05/31/2016 01:12 AM, Christoph Anton Mitterer wrote: > On Fri, 2016-05-27 at 10:44 +0200, Christian Seiler wrote: >> Well, at least for the cases where you mentioned it it works. I did >> another grep through the Gtk+ source code just now though and found >> two other corner cases that aren't covered: >> >> - I wonder wether I should force gtk-dialogs-use-header = FALSE >> in gtk3-nocsd; that causes a header bar to be added to message >> boxes if true (and because of the way shared libraries work, >> the CSD-disabling code will not work without overriding that >> setting). OTOH, according to docs it defaults to FALSE on non >> GNOME desktops (GNOME actually overrides it via dconf when >> running), that's why I've never seen any problems related to >> that. > With GNOME desktops I assume you mean "GNOME _3_ desktops" (i.e. GNOME > Shell)?
Yes. > Did you try it with GNOME fallback/flashback/classic (some of them are > perhaps the same, I kinda lost the overview of their re-branding > orgies)? I just read the source code w.r.t. to gtk-dialogs-use-header, I didn't actually try it in either case. But you can see that if you open the help, for example - it has a menu bar on non-GNOME systems and no CSD by default even if you don't use gtk3-nocsd, because of the gtk-dialogs-use-header setting. (Try: unset GTK_CSD; unset LD_PRELOAD; gedit; and then open the help from the menu.) > But even if it works for them, it may perhaps be worth to: > - add the code (if it's not much) but comment it out and explain what > it would be for The problem is that forcing that setting is actually quite an invasive operation. So while I think it's doable, it's something I'd like to have tested before adding it to the source code. And since it works at the moment because of Gtk defaults, I'm not going to immediately override it, but may work on the code later on. >> So this is not a bug (in either gtk3 or gtk3-nocsd), but just a >> difference that occurs because of varying design decisions. > Okay, I tried around a bit with different CSD/no-CSD programs with and > without gtk3-nocsd... and you seem to be right... :) > gtk3-nocsd doesn't make a difference. > > Still it looks a bit odd, perhaps one should tell those guys to also > disable the top/bottom border line when maximised, in the no-CSD case. What "guys"? The top/bottom border comes from your window WM/DE, not from the gtk3 program. Unless I disable the window borders entirely (and hence the server side decorations), I can't control what the WM/DE does with the borders, that's the entire point... > Especially when, as you've said, they already *do not* display the > left/right border lines. But that's also something your WM/DE does. There are other WMs/DEs that don't remove the left/right borders for maximized windows, for example if you try blackbox in the default configuration. I really don't get what you want here... > What I did notice however, when preloaded (i.e. > no /etc/X11/Xsession.d/01-dont-disable-gtk-csd or so), then I don't > seem to be able to enable CSDs anymore... > I tried by exporting: > GTK3_NOCSD_IGNORE=1 > and also by GTK_CSD=1 Well, setting GTK_CSD=1 (or in fact unsetting GTK_CSD) does get me CSDs back for all gtk programs that support them. GTK3_NOCSD_IGNORE will only work if you put it in your .xessionrc, because that only makes sure that the scripts I install for the X session don't set any environment varialbes (GTK_CSD and LD_PRELOAD) on their own. If you set it in a normal shell, it won't have any effect (because there you can just unset GTK_CSD). So basically, what should happen is the following: - always preloaded (no /etc/X11/Xsession.d/01-.. - in a shell: unset GTK_CSD, but keep LD_PRELOAD - then you should get CSDs back, the same as if you had set GTK3_NOCSD_IGNORE=1 previously > - 438b03ed25097a1a8e2f1e532bf94312101f79c9 fixes the issue with the > keyboard shortcuts window in nautilus not getting the decoration. > - Also the other windows (file properties) do get the decoration (which > I forgot to test last time) :-) > Further thing I've noted, and which I'm abusing this bug for (see gtk3- > nocsd_*.jpeg): [...] > - For the Properties Window,... we have now twice "git Properties", in > the window decorations and in the "CSD bar", perhaps one could leave > the later empty, in case the decoration and CSD bar title are the > same. > - Even more, if the CSD bar would be proven "empty" then, as in the > Properties window case, perhaps it would be possible, to not draw it > at all. So I'm not so sure it's good to remove the title of the CSD bar, because I think the bar looks really empty without it, especially if there are only very few widgets in there instead. But I might be convinced otherwise. That said: what I do have locally is some code that completely hides the header bar if there is _only_ the title (and no custom title) set. So in the case of the "git Properties" window, the header bar would disappear completely - but in the case of the shortcuts window (because it contains this magnifying glass icon) it wouldn't. The problem I still have is that my code causes gedit to crash when switching to full screen mode and back - because gedit there hides the header bar itself, and the code I have so far causes some weird interference. I do have an idea how to fix that, but because this is just a cosmetic problem, I'd really like to get a release out that fixes the other (more serious) things you discovered first. So, if I understand you correctly, all the issues with the code itself are fixed now from your perspective, except the hiding of the header bar, which you just mentioned now? If so, I'll make a new release + Debian package to fix those things, and once that hits the archive work on the minor other issues. Regards, Christian
signature.asc
Description: OpenPGP digital signature