Thank you for the suggestion. I already used a TTimer yesterday, before you mentioned it. Yes it works. Not a good solution but indeed is a workaround.
I performed some tests first using a TToolbar, it had OnMouseLeave issue too. So I tested the toolbars of my Pale Moon and Firefox browsers, I was unable to reproduce the issue. Then I tested the toolbar of my Lazarus' compoment tab, the issue was reproducible. So now I believe it is not a problem of my OS.
I am going to dig deeper. It should be a fix or better solution. I don't think Pale Moon and Firefox use a TTimer to make their toolbars to work correctly.
Update:From the web, I found a Terminal command:
xinput test-xi2 --rootIt is for showing the mouse activity. If you run the command without --root, it shows the mouse position only if the pointer is inside the form.
Can anyone find the API? If Lazarus can use the system-wide hook I believe the bug can be fixed.