To ensure consistent source code in Compiz, the coding style from the existing code should be used in all patches and plug-ins.

The coding style used in Compiz is very similar to what's used in the X server.

Command line for calling the Indent program to format a source code file with settings close to the Compiz coding style:

indent -psl -saf  -sai -saw -sob -i4 -bbo -bls -lp -di1 -pcs -bs -cs -bl -bli0 -cdb -sc -bad -bap -l78

However, David noted that this doesn't not produce the exact style:

The style in compiz is slightly different though. Function parameters
are aligned and I usually align function parameter names and variable
names too. I also cuddle up { in switch statements. Camel caps are used
and I'm pretty strict with keeping all lines less than 80 columns wide.
No extra whitespaces are allowed. Camel caps are not used for gtk code,
like in gtk-window-decorator.c, underscores are used here to match gtk
and cairo.

Names formed from multiple words are written in Camel``Caps in Compiz core and its plugins. This is just to match the style of Xlib and OpenGL functions.