GUI: Do not show tooltip on hovered focused EditText widget #3055
Prevents showing a tooltip for a widget is it is an editable field (editText) and has both mouse hovering above it and the current focus.
This is so that typing text is not interrupted / slowed down by a periodical display of the tooltip, if the mouse is hovering over the same text field that the user is editing.
The bug was mentioned for the Android port on the forums here:
The bool was to quickly update the _lastMousePosition.time always for a TextEdit hovered focused widget However, this was not the code's effect. It would update the time everytime the period kTooltipDelay for displaying tooltip expired. Which can be done without the extra bool variable. I order to always update _lastMousePosition.time, we'd need to also always check the widget under the mouse cursor and if it's of textedit type, not just at kTooltipDelay expiration. This would probably introduce additional delay there for little extra benefit.
I realise now that this is an issue even if the hovered widget is different than the focused EditText widget, since the manager will keep displaying periodically the tooltip for that other widget while the user is typing in the EditText.
If it's ok, I'll close this PR and open a new one.
The if clause will be changed to
Thus we would catch the case where there is a focused EditTextWidget at the same time when mouse cursor is hovering over the same or another widget which has a tooltip.
And also the comments will be updated to reflect this new behavior.