mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 16:00:23 +02:00
fixed thread synchronize support for fpc 1.9.9 using WakeMainThread
git-svn-id: trunk@6880 -
This commit is contained in:
parent
02bb02ec64
commit
83030c9805
@ -26,8 +26,7 @@
|
||||
|
||||
procedure PrepareSynchronize;
|
||||
begin
|
||||
// wake up GUI thread by sending a message to it
|
||||
Windows.PostMessage(TWin32WidgetSet(InterfaceObject).AppHandle, WM_NULL, 0, 0);
|
||||
TWin32WidgetSet(InterfaceObject).HandleWakeMainThread(nil);
|
||||
end;
|
||||
|
||||
{ addition XP messages }
|
||||
@ -1523,6 +1522,9 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.194 2005/03/03 13:13:51 vincents
|
||||
fixed thread synchronize support for fpc 1.9.9 using WakeMainThread
|
||||
|
||||
Revision 1.193 2005/02/10 21:07:29 micha
|
||||
let general WindowProc also handle childedit of combobox, reduces code duplication, implements doubleclick for combobox
|
||||
|
||||
|
@ -174,6 +174,9 @@ Type
|
||||
function CreateComponent(Sender : TObject): THandle; override;
|
||||
function CreateTimer(Interval: integer; TimerFunc: TFNTimerProc) : integer; override;
|
||||
function DestroyTimer(TimerHandle: Integer) : boolean; override;
|
||||
|
||||
// thread synchronize support
|
||||
procedure HandleWakeMainThread(Sender: TObject);
|
||||
|
||||
{$I win32winapih.inc}
|
||||
{$I win32lclintfh.inc}
|
||||
@ -273,7 +276,9 @@ Initialization
|
||||
|
||||
{$ifndef VER1_0}
|
||||
{ TThread.Synchronize support }
|
||||
{$ifdef ver1_9_8}
|
||||
SynchronizeMethodProc := @PrepareSynchronize;
|
||||
{$endif}
|
||||
{$endif}
|
||||
|
||||
Finalization
|
||||
@ -285,6 +290,9 @@ End.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.135 2005/03/03 13:13:51 vincents
|
||||
fixed thread synchronize support for fpc 1.9.9 using WakeMainThread
|
||||
|
||||
Revision 1.134 2005/02/23 01:12:47 marc
|
||||
+ Added RemoveProp winapi call
|
||||
* Some maintenace on winapi/lclintf files
|
||||
|
@ -197,6 +197,11 @@ begin
|
||||
ScreenInfo.PixelsPerInchY := GetDeviceCaps(DC, LOGPIXELSY);
|
||||
ScreenInfo.ColorDepth := GetDeviceCaps(DC, BITSPIXEL);
|
||||
ReleaseDC(Handle, DC);
|
||||
|
||||
// Thread.Synchronize support
|
||||
{$IFNDEF VER1_0}{$IFNDEF VER1_9_8}
|
||||
WakeMainThread := @HandleWakeMainThread;
|
||||
{$ENDIF}{$ENDIF}
|
||||
|
||||
Assert(False, 'Trace:Win32Object.Init - Exit');
|
||||
end;
|
||||
@ -419,6 +424,12 @@ begin
|
||||
Assert(False,'Trace:Destroy timer Result: '+ BOOL_RESULT[result]);
|
||||
end;
|
||||
|
||||
procedure TWin32WidgetSet.HandleWakeMainThread(Sender: TObject);
|
||||
begin
|
||||
// wake up GUI thread by sending a message to it
|
||||
Windows.PostMessage(AppHandle, WM_NULL, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TWin32WidgetSet.AttachMenuToWindow(AMenuObject: TComponent);
|
||||
var
|
||||
AMenu: TMenu;
|
||||
@ -726,6 +737,9 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.308 2005/03/03 13:13:51 vincents
|
||||
fixed thread synchronize support for fpc 1.9.9 using WakeMainThread
|
||||
|
||||
Revision 1.307 2005/02/07 16:19:14 micha
|
||||
force default width and height for calendar control
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user