Right now, one can only join two adjacent areas if they have precisely an edge in common. This makes some area manipulation operations a little hard to do.
I wrote a patch to make the join operator more flexible, allowing operations like these:
Areas have minimum dimensions. Right now, if a join operation as above would leave an area that is too small, the operation is not allowed. I think that's intuitive behavior, but please let me know if this (or anything else) should behave differently.
I'm new to Blender (and new to open source contributions, besides fixing typos), so I wasn't completely sure about the inner working of the windowing system. In particular, I didn't know which redrawing functions need to be called. This is marked in the patch with CODE REVIEW QUESTION.