Recent

Author Topic: Incompatibility of TCustomForm.DoShow in Lazarus 2.2  (Read 1014 times)

tetrastes

  • Sr. Member
  • ****
  • Posts: 481
Incompatibility of TCustomForm.DoShow in Lazarus 2.2
« on: June 30, 2022, 01:19:40 pm »
I have a working program, which was compiled with Lazarus 2.0.8. After compiling with Lazarus 2.2.2 it didn't work as expected.  :-\
I found that this is due to incompatibility of TCustomForm.DoShow. In Lazarus 2.0.8 (and in whole 2.0 branch?) the definition is
Code: Pascal  [Select][+][-]
  1. procedure TCustomForm.DoShow;
  2. begin
  3.   if Assigned(FOnShow) then FOnShow(Self);
  4. end;

while in Lazarus 2.2.2 (and I suppose in 2.2.0)
Code: Pascal  [Select][+][-]
  1. procedure TCustomForm.DoShow;
  2. begin
  3.   if FIsFirstOnShow and (WindowState in [wsMaximized, wsFullScreen]) then
  4.     Exit;
  5.   FIsFirstOnShow := False;
  6.   if Assigned(FOnShow) then FOnShow(Self);
  7. end;
  8.  
This is reflected in CHM help, but not in online help, and not at https://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes#LCL_incompatibilities, though this obviously can break existing code (as it happened to me >:().

So I wonder, what are the sense and purpose of this change, and what is the difference between normal and maximized window, except size?  %)

 

TinyPortal © 2005-2018