implement moving windows across monitors

+ fix activating a maximized window or a minimized to-be-maximized window