in Ubuntu 11.10 all window buttons are aligned left and there seems no way to change this with a GUI tool. You can move the window buttons back to the right with the following command:
gconftool-2 --set /apps/metacity/general/button_layout --type string "menu:minimize,maximize,close"
After this your buttons are on the right side again. I didn’t have to restart my X-server nor relogin.