Fix windows minimize and restore

The windowsMinimized flag was not set so toggleWindows() didn't work.
Minimize or restore windows with Meta-D

Bind Meta-D to toggle windows.
Calculate initial surface position

Implement a clever algorithm to calculate surface initial position.