mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 12:59:12 +02:00
LCL, windows, fix a crash on pressing a key when there is a (html) hint visible
git-svn-id: trunk@31340 -
This commit is contained in:
parent
35a781c607
commit
d2cf3ad43f
@ -187,6 +187,7 @@ type
|
||||
var
|
||||
CurDoubleBuffer: TDoubleBuffer = (DC: 0; Bitmap: 0; BitmapWidth: 0; BitmapHeight: 0);
|
||||
DisabledForms: TList = nil;
|
||||
CurrentWindow: HWND = 0;
|
||||
|
||||
function CheckMouseMovement: boolean;
|
||||
// returns true if mouse did not move between lmousebutton down
|
||||
@ -1374,6 +1375,8 @@ begin
|
||||
end;
|
||||
WM_DESTROY:
|
||||
begin
|
||||
if CurrentWindow=Window then
|
||||
CurrentWindow := 0;
|
||||
if lWinControl is TCustomComboBox then
|
||||
DisposeComboEditWindowInfo(TCustomComboBox(lWinControl));
|
||||
if WindowInfo^.Overlay<>HWND(nil) then
|
||||
@ -2391,7 +2394,13 @@ begin
|
||||
|
||||
// application processing
|
||||
if NotifyUserInput then
|
||||
begin
|
||||
CurrentWindow := Window;
|
||||
NotifyApplicationUserInput(PLMsg^.Msg);
|
||||
if CurrentWindow=0 then
|
||||
// Invalidate associated lWinControl if current window has been destroyed
|
||||
lWinControl := nil;
|
||||
end;
|
||||
|
||||
if Assigned(lWinControl) and (PLMsg^.Msg <> LM_NULL) then
|
||||
DeliverMessage(lWinControl, PLMsg^);
|
||||
|
Loading…
Reference in New Issue
Block a user