cocoa: additional support for processing PostMessage during TrackingEvent loop

git-svn-id: trunk@61259 -
This commit is contained in:
dmitry 2019-05-21 17:15:40 +00:00
parent 66422a9b19
commit d3116a25f7

View File

@ -521,14 +521,21 @@ begin
begin
if (Result.type_ = NSApplicationDefined)
and (Result.subtype = LCLEventSubTypeMessage)
and (Result.data1 = LM_NULL)
and (Result.data2 = WidgetSet.AppHandle)
then
begin
CheckSynchronize;
NSApp.updateWindows;
if Assigned(Application) then
TCrackerApplication(Application).ProcessAsyncCallQueue;
if (Result.data1 = LM_NULL) and (Result.data2 = WidgetSet.AppHandle) then
begin
CheckSynchronize;
NSApp.updateWindows;
if Assigned(Application) then
TCrackerApplication(Application).ProcessAsyncCallQueue;
end
else
begin
sendEvent(Result);
end;
Result := nil
end
else if ((mode = NSEventTrackingRunLoopMode) or mode.isEqualToString(NSEventTrackingRunLoopMode))