mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 05:19:31 +02:00
* fix for carbon Synchronize method, pointer by Roland Turcan
git-svn-id: trunk@19554 -
This commit is contained in:
parent
9d8131f5d6
commit
9cab9d518c
@ -157,6 +157,9 @@ uses
|
||||
Buttons, StdCtrls, PairSplitter, ComCtrls, Calendar, Arrow,
|
||||
Spin, ExtCtrls, FileCtrl, LResources;
|
||||
|
||||
var
|
||||
FirstAppEventLock: pEventState = nil;
|
||||
|
||||
// the implementation of the utility methods
|
||||
{$I carbonobject.inc}
|
||||
// the implementation of the winapi compatibility methods
|
||||
@ -167,10 +170,14 @@ uses
|
||||
|
||||
procedure InternalInit;
|
||||
begin
|
||||
FirstAppEventLock:=BasicEventCreate(nil, true, false, '');
|
||||
end;
|
||||
|
||||
procedure InternalFinal;
|
||||
begin
|
||||
basiceventSetEvent(FirstAppEventLock);
|
||||
basiceventdestroy(FirstAppEventLock);
|
||||
FirstAppEventLock:=nil;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -431,6 +431,7 @@ begin
|
||||
then
|
||||
RaiseGDBException('TCarbonWidgetSet.AppRun post dummy event failed');
|
||||
fMainEventQueue:=CurMainEventQueue;
|
||||
basiceventSetEvent(FirstAppEventLock);
|
||||
|
||||
RunApplicationEventLoop;
|
||||
finally
|
||||
@ -924,6 +925,8 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCarbonWidgetSet.OnWakeMainThread(Sender: TObject);
|
||||
begin
|
||||
// wait infinite for the first (dummy) event sent to the main event queue
|
||||
basiceventWaitFor(-1, FirstAppEventLock);
|
||||
SendCheckSynchronizeMessage;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user