Fix to show folding preview when move the mouse from bottom to top
Without this patch happens in that case nothing. You have to leave the area
an hover again the folding begin to trigger the popup.
- Fix missing cleanup in case of invalid mouse position
- Tried to simplify the code and improve readability
Differential Revision: https://phabricator.kde.org/D20852