X-Git-Url: http://git.openbox.org/?p=dana%2Fopenbox-history.git;a=blobdiff_plain;f=HACKING;h=dab0aad826eb392054232170d5b3bc1553d17b66;hp=afd84869fb4c145d24f50d52e6a1b5ede848018b;hb=d846979db91a81781993b3e14f6bc0803b9c3ed1;hpb=c2983d1f155e3fe67d32cf9cf10cb2cb7661096b diff --git a/HACKING b/HACKING index afd8486..dab0aad 100644 --- a/HACKING +++ b/HACKING @@ -1,18 +1,13 @@ -Woop, a HACKING document for openbox at last! - dirs: - kernel - core of the WM + openbox - core of the WM render - librender, rendering routines for the WM and for apps - cwmcc - client-wm-client communication. netwm/icccm helper routines - for the WM and apps - obcf - openbox config format, generic parser for config files - plugins - various plugins + parser - libparser, for parsing config files 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 -following transient_for. When TRAN_GROUP is found, Client.group will always -be !NULL. Some smart action should be taken using all members of the group in -this case. +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)! 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 @@ -21,3 +16,19 @@ 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. + +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 + * functions should have the opening and closing braces on their own + lines + * most other constructs should have braces on the same line as the + statement + * 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 + +