mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 16:39:15 +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,
|
Buttons, StdCtrls, PairSplitter, ComCtrls, Calendar, Arrow,
|
||||||
Spin, ExtCtrls, FileCtrl, LResources;
|
Spin, ExtCtrls, FileCtrl, LResources;
|
||||||
|
|
||||||
|
var
|
||||||
|
FirstAppEventLock: pEventState = nil;
|
||||||
|
|
||||||
// the implementation of the utility methods
|
// the implementation of the utility methods
|
||||||
{$I carbonobject.inc}
|
{$I carbonobject.inc}
|
||||||
// the implementation of the winapi compatibility methods
|
// the implementation of the winapi compatibility methods
|
||||||
@ -167,10 +170,14 @@ uses
|
|||||||
|
|
||||||
procedure InternalInit;
|
procedure InternalInit;
|
||||||
begin
|
begin
|
||||||
|
FirstAppEventLock:=BasicEventCreate(nil, true, false, '');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure InternalFinal;
|
procedure InternalFinal;
|
||||||
begin
|
begin
|
||||||
|
basiceventSetEvent(FirstAppEventLock);
|
||||||
|
basiceventdestroy(FirstAppEventLock);
|
||||||
|
FirstAppEventLock:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -431,6 +431,7 @@ begin
|
|||||||
then
|
then
|
||||||
RaiseGDBException('TCarbonWidgetSet.AppRun post dummy event failed');
|
RaiseGDBException('TCarbonWidgetSet.AppRun post dummy event failed');
|
||||||
fMainEventQueue:=CurMainEventQueue;
|
fMainEventQueue:=CurMainEventQueue;
|
||||||
|
basiceventSetEvent(FirstAppEventLock);
|
||||||
|
|
||||||
RunApplicationEventLoop;
|
RunApplicationEventLoop;
|
||||||
finally
|
finally
|
||||||
@ -924,6 +925,8 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCarbonWidgetSet.OnWakeMainThread(Sender: TObject);
|
procedure TCarbonWidgetSet.OnWakeMainThread(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
// wait infinite for the first (dummy) event sent to the main event queue
|
||||||
|
basiceventWaitFor(-1, FirstAppEventLock);
|
||||||
SendCheckSynchronizeMessage;
|
SendCheckSynchronizeMessage;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user