mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:09:32 +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
|
var
|
||||||
CurDoubleBuffer: TDoubleBuffer = (DC: 0; Bitmap: 0; BitmapWidth: 0; BitmapHeight: 0);
|
CurDoubleBuffer: TDoubleBuffer = (DC: 0; Bitmap: 0; BitmapWidth: 0; BitmapHeight: 0);
|
||||||
DisabledForms: TList = nil;
|
DisabledForms: TList = nil;
|
||||||
|
CurrentWindow: HWND = 0;
|
||||||
|
|
||||||
function CheckMouseMovement: boolean;
|
function CheckMouseMovement: boolean;
|
||||||
// returns true if mouse did not move between lmousebutton down
|
// returns true if mouse did not move between lmousebutton down
|
||||||
@ -1374,6 +1375,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
WM_DESTROY:
|
WM_DESTROY:
|
||||||
begin
|
begin
|
||||||
|
if CurrentWindow=Window then
|
||||||
|
CurrentWindow := 0;
|
||||||
if lWinControl is TCustomComboBox then
|
if lWinControl is TCustomComboBox then
|
||||||
DisposeComboEditWindowInfo(TCustomComboBox(lWinControl));
|
DisposeComboEditWindowInfo(TCustomComboBox(lWinControl));
|
||||||
if WindowInfo^.Overlay<>HWND(nil) then
|
if WindowInfo^.Overlay<>HWND(nil) then
|
||||||
@ -2391,7 +2394,13 @@ begin
|
|||||||
|
|
||||||
// application processing
|
// application processing
|
||||||
if NotifyUserInput then
|
if NotifyUserInput then
|
||||||
|
begin
|
||||||
|
CurrentWindow := Window;
|
||||||
NotifyApplicationUserInput(PLMsg^.Msg);
|
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
|
if Assigned(lWinControl) and (PLMsg^.Msg <> LM_NULL) then
|
||||||
DeliverMessage(lWinControl, PLMsg^);
|
DeliverMessage(lWinControl, PLMsg^);
|
||||||
|
Loading…
Reference in New Issue
Block a user