[PATCH 5/6 xserver] xwayland: make more explicit root window creation path
tiago.vignatti at linux.intel.com
Tue Apr 3 07:47:02 PDT 2012
On 04/03/2012 05:18 PM, Daniel Stone wrote:
> On 3 April 2012 14:58, Tiago Vignatti<tiago.vignatti at intel.com> wrote:
>> Just moving code around. No functional changes.
> Sorry, I'm not sure I really like this one, unless you're planning to
> add an else branch; even then, that might well be fodder for helper
> functions. The early-return style is good not only at reducing our
> indentation levels -- which is pretty essential with eight-space
> indents -- but also at making it immediately obvious what's going to
> get returned for the uncommon case.
there's more personal style than anything else to justifies a change in
this patch. I first was tempted to only add a commentary mentioning
where's the root window path is (/* InitRootWindow path */) and where WM
and other clients go, but I ended up moving all the code. The thing is
that I just like when the ordinary execution path is to start at the
beginning of a function and ends at the end.
so yeah, maybe you're right. Let's just not make a big thing of it..
More information about the wayland-devel