2003-04-09 17:59:44 +00:00
|
|
|
dirs:
|
2007-05-15 15:37:42 +00:00
|
|
|
openbox - core of the WM
|
2003-04-09 17:59:44 +00:00
|
|
|
render - librender, rendering routines for the WM and for apps
|
2005-09-01 15:50:28 +00:00
|
|
|
parser - libparser, for parsing config files
|
2003-04-09 17:59:44 +00:00
|
|
|
|
2003-04-07 08:48:12 +00:00
|
|
|
Beware the Client.transient_for. It can be set to a !NULL value of TRAN_GROUP,
|
|
|
|
which is not a valid pointer. You must ALWAYS check for TRAN_GROUP before
|
2007-05-15 15:37:42 +00:00
|
|
|
following transient_for. However if it is transient for the group, this
|
|
|
|
excludes other windows whom are transient for the group, and windows which
|
|
|
|
are children of the window (infinite loops would result)!
|
2003-04-07 08:53:07 +00:00
|
|
|
|
|
|
|
When using coordinates/sizes of windows, make sure you use the right area. The
|
|
|
|
Client.area rect is the reference point and size of the *CLIENT* window. This
|
|
|
|
value is not what you see in any shape or form, and gravity is applied to it to
|
|
|
|
translate it into what you see. The Client.frame.area is the actual position
|
|
|
|
and size of the entire frame. This is usually the value you want to use, unless
|
|
|
|
you are in client.c (probably) and adjusting/using the position or size from
|
|
|
|
the client's perspective.
|
2003-05-18 16:10:38 +00:00
|
|
|
|
|
|
|
Indentation
|
|
|
|
-----------
|
|
|
|
For openbox, we aim to have consistent coding style. Some, but surely
|
|
|
|
not all, guidelines:
|
|
|
|
* use 4 space indents
|
|
|
|
* tabs should not appear in source files
|
2013-08-18 22:11:26 +00:00
|
|
|
* closing braces always go on a new line
|
|
|
|
* for functions, the opening brace goes on a new line
|
|
|
|
void foo()
|
|
|
|
{
|
|
|
|
hi;
|
|
|
|
}
|
|
|
|
* for control blocks, the opening brace goes on the same line as the
|
|
|
|
condition, unless the condition spans more than one line. then the brace
|
|
|
|
goes on a new line.
|
|
|
|
if (one line) {
|
|
|
|
hi;
|
|
|
|
}
|
|
|
|
if (first line &&
|
|
|
|
second line)
|
|
|
|
{
|
|
|
|
hi;
|
|
|
|
}
|
|
|
|
* always use braces around conditional blocks that consist of more than one
|
|
|
|
line, even if they contain a single statement
|
|
|
|
if (check) {
|
|
|
|
/* Check was true. */
|
|
|
|
yay = true(ok,
|
|
|
|
thanks);
|
|
|
|
}
|
|
|
|
* don't need to use braces for conditional blocks that use only a single
|
|
|
|
line, including comments.
|
|
|
|
if (check)
|
|
|
|
all_on_one_line_so_no_braces_needed();
|
2003-05-18 16:10:38 +00:00
|
|
|
* when in doubt look at the rest of the source
|
|
|
|
* vim users can use "set expandtab tabstop=4 shiftwidth=4
|
|
|
|
softtabstop=4" for some of this
|