MP1-4578: Fix MP freeze on resume related to wrong window handle detection (MP not focused)
MP1-4578 : Code formatting/beautification changes.