X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=HACKING;h=3433ad67f608c15451ae84d9ffbc41b79df94931;hb=0116d82463197bea2890230d71a69e4b92489166;hp=6cc4f52f36d8c6074f14545f0954efcd5eb24859;hpb=91f2c11af0b7012c747aa6fe101e448ea9842034;p=chaz%2Fopenbox diff --git a/HACKING b/HACKING index 6cc4f52f..3433ad67 100644 --- a/HACKING +++ b/HACKING @@ -1,7 +1,40 @@ Woop, a HACKING document for openbox at last! +dirs: + kernel - core of the WM + render - librender, rendering routines for the WM and for apps + 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. + Smart action idea: + Skip over members of the group that are also transients of the group + (have Client.transient_for set to TRAN_GROUP). These windows are not + ancestors and using them will also end up causing infinite loops! + +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. + +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 + +