Fixed bug regarding activating a monitor ...

... by clicking on the desktop
Extended the bug fix from r145:dc91cfafb64c ...

... to all methods of closing windows
Added code related to issue #7

bug.n now acts on changed display resolution and added monitors