[Lazarus] revision 51597 attn Ondrej

Ondrej Pokorny lazarus at kluug.net
Sun Feb 14 17:25:07 CET 2016


On 14.02.2016 15:15, zeljko wrote:
> On 02/14/2016 03:01 PM, zeljko wrote:
>> In that revision you added RecreateWnd() for modal forms. Why ? Now in
>> console we have warnings about it... IMO:
>> 1.it's wrong to call RecreateWnd() if handle isn't allocated yet
>
> There shuold be added if (popupMode = pmNone) and HandleAllocated, 
> otherwise call just needed routines from RecreateWnd() like 
> UpdateControlState

Yes, you are right. Thanks for reporting!

RecreateWnd is needed because TCustomForm.GetRealPopupParent result 
changes for PopupMode=pmNode after change from non-modal to modal window 
(fsModal in FormState).

Fixed in r51631, I also tested it without HandleNeeded, it seems to work 
well, no problem that the handle is allocated on-demand. So I removed 
it. If there'll be any problems, we can remember to write HandleNeeded back.

Ondrej




More information about the Lazarus mailing list