The window manager Metacity (that Unity 2D uses) can support this.
Use "gconf-editor" to navigate to the keys: /app/metacity/general/action_middle_click_titlebar /app/metacity/general/action_right_click_titlebar
You can set the values of these keys to settings like "toggle_maximize_vertically" and "toggle_maximize_horizontally" to get exactly what you want.
The window manager Metacity (that Unity 2D uses) can support this.
Use "gconf-editor" to navigate to the keys: general/ action_ middle_ click_titlebar general/ action_ right_click_ titlebar
/app/metacity/
/app/metacity/
You can set the values of these keys to settings like "toggle_ maximize_ vertically" and "toggle_ maximize_ horizontally" to get exactly what you want.