Windows should be activated in these cases: 1- when we click on non active window. 2- when we cancel a moving or resizing of a non active window.