[Lazarus] Lazarus Release Candidate 2 of 2.2.0

Kostas Michalopoulos badsectoracula at gmail.com
Tue Nov 2 16:51:27 CET 2021

On 11/2/2021 2:54 PM, Mattias Gaertner via lazarus wrote:
> The Lazarus team is glad to announce the second release candidate of
> Lazarus 2.2.

Neat. I did a bit of testing with some of my projects and everything 
that worked in the last stable version i had (2.0.6) seems to work fine 
with 2.2.0RC2.

I also did some testing with the MDI functionality that was implemented 
in Win32 last year, which BTW...

> Here is the list of changes for Lazarus and Free Pascal:
> http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes
> http://wiki.lazarus.freepascal.org/User_Changes_3.2.2

...isn't mentioned in the Lazarus changelog (the first non-trunk version 
to have it was 2.2.0RC1, at least from a quick look in the source code 
of 2.2.0RC1 and 2.0.12).

The MDI stuff seem to work mostly fine, however there is an issue i 
noticed with paint and form resize events. I used this doodle app 
(perhaps i can modify it and have it part of Lazarus tests or something 
to test MDI support in other widgetsets?):


This builds with Delphi 2 (which is the only Delphi i have access to and 
what i used as the behavioral basis for my Win32 MDI patch) and Lazarus 
(make sure to clean everything between builds).

The difference is between Delphi 2, an older SVN-based build of Lazarus 
i have (Lazarus 2.1.0 r64351M FPC 3.3.1 x86_64-win64-win32/win64) and 

In Delphi 2 the program receives only a single resize event in the MDI 
child form for the final form size (notice how the both the main form 
and the MDI child form use the default size which lets windows place it 
as it wants) followed by a paint event. The app uses a bitmap to store 
the doodle which is setup during resize events and is drawn on the form 
itself during paint events.

In r63451M the program receives two resize events, one for some initial 
(stored during design time, i think) size followed by the larger (due to 
my large monitor) form size that is shown when it is in MDI - both are 
fine as long as the final size event is correct, IMO, so no problem 
here. Then a paint event follows.

In 2.2.0RC2 however the paint event comes between the initial and second 
resize events which means that the background bitmap is not set up properly.

Now of course it'd be trivial to work around the change by adding an 
Invalidate call to the resize event, but IMO this is a regression. There 
should either be a second paint event or the paint event should be 
delayed until sizing is settled. This would be both consistent with how 
size and paint events seemed to work in previous version of Lazarus as 
well as Delphi and also consistent with how Windows (from where most of 
the VCL and LCL behavior comes from) behaves with WM_SIZE and WM_PAINT 
(WM_SIZE always comes before WM_PAINT and WM_PAINT is always sent if a 
window is enlarged to paint the new area).

Beyond the above i couldn't find any other issues with 2.2.0RC2.


More information about the lazarus mailing list