Compilation fix and starts TApplication.MoveFormFocusToChildren

git-svn-id: trunk@34365 -
This commit is contained in:
sekelsenmat 2011-12-22 16:58:18 +00:00
parent cbb0725222
commit cbe7d6ff5f
5 changed files with 12 additions and 7 deletions

View File

@ -1255,6 +1255,7 @@ type
FLayoutAdjustmentPolicy: TLayoutAdjustmentPolicy;
FMainFormOnTaskBar: Boolean;
FModalLevel: Integer;
FMoveFormFocusToChildren: Boolean;
FOnGetMainFormHandle: TGetHandleEvent;
FOnMessageDialogFinished: TModalDialogFinished;
FOnModalBegin: TNotifyEvent;
@ -1485,6 +1486,7 @@ type
property MainFormHandle: HWND read GetMainFormHandle;
property MainFormOnTaskBar: Boolean read FMainFormOnTaskBar write SetMainFormOnTaskBar; platform;
property ModalLevel: Integer read FModalLevel;
property MoveFormFocusToChildren: Boolean read FMoveFormFocusToChildren write FMoveFormFocusToChildren default True;
property MouseControl: TControl read FMouseControl;
property TaskBarBehavior: TTaskBarBehavior read FTaskBarBehavior write SetTaskBarBehavior;
property OnActionExecute: TActionEvent read FOnActionExecute write FOnActionExecute;

View File

@ -108,6 +108,7 @@ begin
FHintShortPause := DefHintShortPause;
FHintHidePause := DefHintHidePause;
FHintHidePausePerChar := DefHintHidePausePerChar;
FMoveFormFocusToChildren := True;
FShowHint := true;
FShowMainForm := true;
FRestoreStayOnTop := nil;

View File

@ -927,7 +927,8 @@ begin
FActive := AValue;
if FActive then
begin
if (ActiveControl = nil) and not (csDesigning in ComponentState) then
if (ActiveControl = nil) and (not (csDesigning in ComponentState))
and Application.MoveFormFocusToChildren then
ActiveControl := FindDefaultForActiveControl;
SetWindowFocus;
end;

View File

@ -322,16 +322,18 @@ uses
customdrawnprivate,
LCLMessageGlue;
const
{$ifdef CD_Windows}
const
CDBackendNativeHandle = nhtWindowsHWND;
{$define CD_HasNativeFormHandle}
{$endif}
{$ifdef CD_X11}
const
CDBackendNativeHandle = nhtX11TWindow;
{$define CD_HasNativeFormHandle}
{$endif}
{$ifdef CD_Cocoa}
const
CDBackendNativeHandle = nhtCocoaNSWindow;
{$define CD_HasNativeFormHandle}
{$endif}

View File

@ -630,6 +630,7 @@ procedure TLazCanvas.FillRect(X1, Y1, X2, Y2: Integer);
begin
FillRect (Rect(X1,Y1,X2,Y2));
end;
{$endif}
procedure TLazCanvas.FillColor(AColor: TFPColor;
AIgnoreClippingAndWindowOrg: Boolean);
@ -644,14 +645,12 @@ begin
end
else
begin
for y := 0 to Height-1 do
for x := 0 to Width-1 do
SetColor(x, y, AColor);
for y := 0 to Height-1 do
for x := 0 to Width-1 do
SetColor(x, y, AColor);
end;
end;
{$endif}
procedure TLazCanvas.AssignPenData(APen: TFPCustomPen);
begin
if APen = nil then Exit;