Hi, On 05/19/2016 05:40 PM, Christoph Anton Mitterer wrote: > I think it would be nice if there was some way to have gtk3-nocsd only > enabled (i.e. LD_LIBRARY_PRELOADed) for programs which actually make use > of CSDs. > > Even though gtk3-nocsd is designed to work nicely with other programs as > well, we've seen that it can impact them (see the recent bugs I've > reported) and there are probably other reasons why one may wish not to > have it preloaded for other apps (and if it's just the time spent for > the loading or possible side-effects when doing debugging, etc.). > > Unfortunatly I don't see a real straightforward way to get that.
So I can provide a possible solution, don't know what you think
about it: the preloading itself is completely harmless, only
the functionality added by gtk3-nocsd might cause problems. For
example, if you set GTK_CSD=1, gtk3-nocsd should be a complete
no-op. [1]
Therefore, what about introducing a way to specify program names
for which CSD are supposed to be disabled? (e.g. additional env
var and/or a configuration file) Then we could have the
following:
- if no app-specific configuration is shipped, disable CSD
globally
- if app-specific configuration is shipped, then compare the
application name (argv[0]? process name in /proc?) and see
if CSD should be disabled for that app or not. If not,
then just do nothing, as if CSD had been enabled anyway
I wouldn't want to ship such a configuration in the package
itself (I do believe that it should be always on and I am
eating my own dogfood here and have it installed on my own
systems in that configuration), but it would allow other people
to configure this in the manner they want.
There will probably have to be some discussion to converge to
the best solution w.r.t. the details here, but could you live
with this general approach?
Regards,
Christian
[1] And if it isn't, please file a bug report with severity
serious.
signature.asc
Description: OpenPGP digital signature

