Merged revision(s) 56857 #3ba9674deb from trunk:

win32: fix double CM_MOUSELEAVE messages. Issue #32844
........

git-svn-id: branches/fixes_1_8@56861 -
This commit is contained in:
maxim 2017-12-27 22:36:55 +00:00
parent f57595bd62
commit 1ca943c156
2 changed files with 8 additions and 2 deletions

View File

@ -1983,7 +1983,7 @@ begin
case Msg of
WM_MOUSEFIRST..WM_MOUSELAST:
if Application.MouseControl<>lWinControl then
if (LastMouseTracking<>lWinControl) then
begin
// register for WM_MOUSELEAVE
FillChar(LMouseEvent, SizeOf(TTRACKMOUSEEVENT), 0);
@ -1992,6 +1992,7 @@ begin
LMouseEvent.hwndTrack := Window;
LMouseEvent.dwHoverTime := HOVER_DEFAULT;
_TrackMouseEvent(@LMouseEvent);
LastMouseTracking := lWinControl;
end;
end;
@ -2238,7 +2239,11 @@ begin
begin
NotifyUserInput := True;
LMessage.Msg := LM_MOUSELEAVE;
Application.DoBeforeMouseMessage(nil);
if lWinControl=LastMouseTracking then
begin
Application.DoBeforeMouseMessage(nil);
LastMouseTracking := nil;
end;
end;
WM_MOUSEMOVE: DoMsgMouseMove;
WM_MOUSEWHEEL: if DoMsgMouseWheel(Result) then Exit;

View File

@ -274,6 +274,7 @@ type
var
LastMouse: TLastMouseInfo;
LastMouseTracking: TControl = nil;
ComboBoxHandleSizeWindow: HWND = 0;
IgnoreNextCharWindow: HWND = 0; // ignore next WM_(SYS)CHAR message
IgnoreKeyUp: Boolean = True; // ignore KeyUp after application start; issue #30836