Re: [Lazarus] revision 51597 attn Ondrej
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 2.HandleNeeded isn't really needed after RecreateWnd() Forget about this one, I was wrong here. z -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] revision 51597 attn Ondrej
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 2.HandleNeeded isn't really needed after RecreateWnd() So, because of warnings, something is wrong with that revision. zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] revision 51597 attn Ondrej
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 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus