Fix centerWindow() when the taskbar is located along the top or left screen edge

centerWindow() will not center the window correctly when the taskbar is located along the top or left screen edge.
Merge pull request #2543 from FlagellumDei/patch-1

centerWindow() fix