diff --git a/lcl/forms.pp b/lcl/forms.pp index 115334503f..1320d37a1c 100644 --- a/lcl/forms.pp +++ b/lcl/forms.pp @@ -160,7 +160,7 @@ type Procedure SetFocus; override; function SetFocusedControl(Control : TWinControl): Boolean ; Virtual; Procedure FocusControl(Control : TWinControl); - Function ShowModal : Integer; + Function ShowModal : Integer; property Active : Boolean read FActive; property BorderStyle : TFormBorderStyle read FBorderStyle write SetBorderStyle default bsSizeable; property Canvas: TControlCanvas read GetCanvas; diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index d1170ad224..d0b9388e40 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -932,8 +932,17 @@ end; { TCustomForm ShowModal } {------------------------------------------------------------------------------} Function TCustomForm.ShowModal : Integer; +{var + WindowList: Pointer; + SaveFocusCount: Integer; + SaveCursor: TCursor; + SaveCount: Integer; + ActiveWindow: HWnd;} begin //writeln('[TCustomForm.ShowModal] START ',Classname); + if Visible or not Enabled or (fsModal in FFormState) or + (FormStyle = fsMDIChild) then + raise EInvalidOperation.Create('TCustomForm.ShowModal impossible'); { TODO : This has to be changed by WM_VISIBLECHANGED. Implement appropriate callback !!! } //Kill capture when opening another dialog if GetCapture <> 0 then SendMessage(GetCapture,LM_CANCELMODE,0,0); @@ -958,6 +967,9 @@ end; { ============================================================================= $Log$ + Revision 1.39 2002/04/26 12:26:50 lazarus + MG: improved clean up + Revision 1.38 2002/03/25 17:59:20 lazarus GTK Cleanup Shane