View Issue Details

IDProjectCategoryView StatusLast Update
0032844LazarusLCLpublic2019-05-09 03:37
Reporterjamie philbrookAssigned ToOndrej Pokorny 
Status closedResolutionfixed 
Platform64 maybe 32 too?OSWindowsOS Version10
Product Version1.8Product Build56594 
Target Version1.8.2Fixed in Version1.9 (SVN) 
Summary0032844: Mouse leave event fires going into control once until you reposition opposite axes of mouse.
Descriptionit seems there is an issue with the mouse leave trigger as you move the
mouse into the control.
 if you maintain the opposite axes of the mouse and move the pointer back out
of the control you'll get the onMouseLeave event like you should then reenter
the same control without changing the opposite axes of the mouse position and
then it'll enter the control without triggering the Leave event..

 If you move the opposite axes of the mouse pointer then it repeats itself

 so the first time into the control it appears to trigger the event. of course
it could be the if I were to maintain the opposite axes of the mouse pointer and go between two controls it make actually work but if just sweep the pointer
into the control there by ensuring both axes are changed, it triggers a leave message when entering..
Steps To Reproducedrop a tbutton on the form and implement the OnMouseLeave, place a
beep in there or something for indication.

 Move your mouse into the control and out, experiment with maintining
the opposite axes then change the opposite axes of the mouse and see what
TagsNo tags attached.
Fixed in Revision56857
Attached Files


child of 0031510 closedOndrej Pokorny MouseLeave isn't executed if mouse goes directly from a control to another overlying application 


Bart Broersma

2017-12-18 23:27

developer   ~0104832

What do you mean with "opposite axis of mouse"?

jamie philbrook

2017-12-19 01:31

reporter   ~0104836

Last edited: 2017-12-19 01:33

View 3 revisions

I mean if you were to not move the other direction.

 1. Place button on form;
 2. Implement OnMouseLeave;
 3. Place Mouse left of button;
 4. Move Mouse towards right slowly until it touches left side of button
    : You get a OnMouseLeave event; BAD.
 5: Move Mouse Inside Button, but keep in mind not to move the mouse up or down;

 6: Move mouse back to the left out side the button;
    :You get a OnMouseLeave :Good;
 7: Move mouse back to the Right side of button, don't change vertical direction of mouse
 8: You no longer get the false OnMouseLeave Message;

 as long as you don't change the mouse position veritically, you can now keep going in/out of the button left to right and the messages are handled.

 9: Now change the vertical position of mouse and repeat, you'll see the same
pattern happening.

 it seems that once axes does not change the other axes that is changing, behaves.

 change both axes of the mouse (directions) and then enter the control, you get a OnMouseLeave message.

Bart Broersma

2017-12-22 15:46

developer   ~0104946

That sounds rather odd indeed.

Juha Manninen

2017-12-22 18:44

developer   ~0104949

Is it a regression? Could you please find the revision that broke it.

jamie philbrook

2017-12-22 22:53

reporter   ~0104951

I can not say because I normally don't use that event however, I noticed it
when I installed 1.8.0 and as far as I know I can only get two installs on a
 Currently I have the 1.8.0-32 and 64 installed so it would be hard for me
to test that issue..

 I investigated this while helping someone else on the forums because they stated they were getting unexpected CM_MouseLeave messages when upgrading to 1.8.0 from 1.6.4 in a large set of custom controls they wrote. But I did this case using a Tbutton as an example to find a workaround.

 Hope that helps some

Juha Manninen

2017-12-23 01:02

developer   ~0104952

Last edited: 2017-12-23 01:05

View 2 revisions

> as far as I know I can only get two installs on a PC.

You can have as many versions of Lazarus on your PC as you want.
Besides, the sources from SVN do not really need an installation. Just build them with "make". FPC must be installed obviously.
Guilty revision can be found by bisecting :

Ondrej Pokorny

2017-12-26 08:30

developer   ~0105013

I just tested 1.6 fixes and it doesn't have this bug - it is indeed a regression. Jamie, would you please be so kind and find the guilty revision as Juha asked?

Ondrej Pokorny

2017-12-27 13:26

developer   ~0105042

Caused by r54371 0031510

Ondrej Pokorny

2017-12-27 17:20

developer   ~0105045

Fixed. Please retest on trunk. It will be merged to 1.8.2

jamie philbrook

2019-05-09 03:37

reporter   ~0116094


Issue History

Date Modified Username Field Change
2017-12-18 01:29 jamie philbrook New Issue
2017-12-18 23:27 Bart Broersma Note Added: 0104832
2017-12-18 23:28 Bart Broersma LazTarget => -
2017-12-18 23:28 Bart Broersma Status new => feedback
2017-12-19 01:31 jamie philbrook Note Added: 0104836
2017-12-19 01:31 jamie philbrook Status feedback => new
2017-12-19 01:32 jamie philbrook Note Edited: 0104836 View Revisions
2017-12-19 01:33 jamie philbrook Note Edited: 0104836 View Revisions
2017-12-22 15:46 Bart Broersma Note Added: 0104946
2017-12-22 18:44 Juha Manninen Note Added: 0104949
2017-12-22 22:53 jamie philbrook Note Added: 0104951
2017-12-23 01:02 Juha Manninen Note Added: 0104952
2017-12-23 01:05 Juha Manninen Note Edited: 0104952 View Revisions
2017-12-26 08:25 Ondrej Pokorny Assigned To => Ondrej Pokorny
2017-12-26 08:25 Ondrej Pokorny Status new => assigned
2017-12-26 08:30 Ondrej Pokorny Note Added: 0105013
2017-12-27 13:26 Ondrej Pokorny Relationship added child of 0031510
2017-12-27 13:26 Ondrej Pokorny Note Added: 0105042
2017-12-27 17:20 Ondrej Pokorny Fixed in Revision => 56857
2017-12-27 17:20 Ondrej Pokorny LazTarget - => 1.8.2
2017-12-27 17:20 Ondrej Pokorny Note Added: 0105045
2017-12-27 17:20 Ondrej Pokorny Status assigned => resolved
2017-12-27 17:20 Ondrej Pokorny Fixed in Version => 1.9 (SVN)
2017-12-27 17:20 Ondrej Pokorny Resolution open => fixed
2017-12-27 17:20 Ondrej Pokorny Target Version => 1.8.2
2019-05-09 03:37 jamie philbrook Status resolved => closed
2019-05-09 03:37 jamie philbrook Note Added: 0116094