diff --git a/lcl/forms.pp b/lcl/forms.pp index 835e52061f..7f687a0a8d 100644 --- a/lcl/forms.pp +++ b/lcl/forms.pp @@ -478,7 +478,6 @@ type procedure WMActivate(var Message : TLMActivate); message LM_ACTIVATE; procedure WMCloseQuery(var message: TLMessage); message LM_CLOSEQUERY; procedure WMDeactivate(var Message : TLMActivate); message LM_DEACTIVATE; - procedure WMPaint(var message: TLMPaint); message LM_PAINT; procedure WMShowWindow(var message: TLMShowWindow); message LM_SHOWWINDOW; procedure WMSize(var message: TLMSize); message LM_Size; procedure WMWindowPosChanged(var Message: TLMWindowPosChanged); message LM_WINDOWPOSCHANGED; diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index 983f845cc7..c59e57bc77 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -505,7 +505,7 @@ end; ------------------------------------------------------------------------------} procedure TCustomForm.WMDeactivate(var Message : TLMActivate); begin - FActive:=false; + SetActive(False); {$IFDEF EnableAsyncDeactivate} if Application<>nil then Application.QueueAsyncCall(@Application.Deactivate,0); @@ -578,21 +578,6 @@ begin if Assigned(FOnDeactivate) then FOnDeactivate(Self); end; -{------------------------------------------------------------------------------ - Method: TCustomForm.WMPaint - Params: Msg: The paint message - Returns: nothing - - Paint event handler. - ------------------------------------------------------------------------------} -procedure TCustomForm.WMPaint(var Message: TLMPaint); -begin - //DebugLn('[TCustomForm.WMPaint] ',Name,':',ClassName); - inherited WMPaint(Message); - //DebugLn('[TCustomForm.WMPaint] END ',Name,':',ClassName); -end; - - {------------------------------------------------------------------------------ Method: TCustomForm.WMSize Params: Msg: The Size message @@ -818,7 +803,8 @@ end; ------------------------------------------------------------------------------} procedure TCustomForm.DefocusControl(Control: TWinControl; Removing: Boolean); begin - if Control.ContainsControl(FActiveControl) then begin + if Control.ContainsControl(ActiveControl) then + begin {$IFDEF VerboseFocus} debugln('TCustomForm.DefocusControl Control=',DbgSName(Control),' FActiveControl=',DbgSName(FActiveControl)); {$ENDIF}