Better logic for hide and exit from edit mode
When clicking on the desktop it failed to get out of edit mode as the previous logic only worked when the focus went to another process
now monitor the focuschange of the QGuiApplication, we know both if a panel popup is focused if is focused a window we want to make it out of edit mode, like the desktop, or on another process when the focusedWindow becomes empty