Closed maxkleiner closed 6 months ago
on linux or wine vms you should disable application.processmessages like Procedure ProcessMessagesOFF; //application.processmessages Procedure ProcessMessagesON; or {$IFDEF MSWINDOWS}
procedure TIdAntiFreeze_Process;
var
Msg: TMsg;
ApplicationHasPriority: boolean;
begin
if ApplicationHasPriority then begin
Application.ProcessMessages;
end else begin
// This guarantees it will not ever call Application.Idle
if PeekMessage(Msg, 0, 0, 0, PM_NOREMOVE) then begin
Application.HandleMessage;
end;
end;
end;
{$ENDIF}
by calling direct app.onmessage handler we get an app crash but indirect it works an we stop the loop with Q to quit:
end;