Correctly fit the window into the monitor on restore
Fixed immediate restore/maximize after restore/maximize
Moved things around and exposed DPI-related APIs