xfdesktop: globals or not ?
Brian Tarricone
brian at tarricone.org
Tue Nov 1 03:23:17 CET 2022
On Mon, Oct 31, 2022, at 04:35, Enrico Weigelt, metux IT consult wrote:
> Hello friends,
>
>
> in current xfdesktop code, we've got lots of global fields. But also
> lots of stuff in individual objects that's practically singleton,
> eg. anything in XfceApplication, XfConfChannel references, etc.
>
> Both approaches, global fields vs. local fields of singleton objects
> have good arguments, but IMHO only makes sense if done consequently.
> Right now we're in somewhere the middle, pieces of both mixed up.
>
> Thus, I'd like to clean up the situation, completely into either
> or the other direction.
>
> But which of the two directions shall we go ?
I generally dislike globals (though admittedly I'm probably responsible for most of the globals in xfdesktop, when I was younger and more foolish).
A warning, first, though: I intend to merge my Wayland branch shortly after branching for 4.18, so you may want to hold off on changes that touch a bunch of files and code, as you'll likely have some merge conflicts to deal with. Right now I am holding off on merging or engaging in any elective refactoring; since xfdesktop doesn't have a test suite, I'd rather not make a bunch of unnecessary changes before the 4.18 release.
Also I'm planning a bunch of refactoring myself, though likely mostly around the icon view code. So let's do our best not to have MRs that try to fight each other :)
-brian
More information about the Xfce4-dev
mailing list