Made sure that windows cannot be moved outside of the dekstop's window area.
Removed unused method.
The max window height position now also uses the height when calculating the max position.
Remvoed unused code.
Done some work on maximizing a window.
Revert "Removed unused method."

This reverts commit fce5f38ab3124e6ec48555470fba7c3b04fec9d6.
Windows can now be maximized and then restored to the original size.