LCL: Fix disappearing taskbar icon when FormStyle is fsNone or fsDialog. Patch by Iluha Companets, issue #41189.

This commit is contained in:
wp_xyz 2024-10-29 22:32:30 +01:00
parent db6685cd02
commit 01640ee298

View File

@ -222,10 +222,11 @@ begin
if HandleAllocated then if HandleAllocated then
begin begin
FreeIconHandles; FreeIconHandles;
if not (BorderStyle in [bsDialog, bsNone]) then // bsNone as workaround for #41189 if (Self = Application.MainForm) or // main form must have icon anyway
TWSCustomFormClass(WidgetSetClass).SetIcon(Self, SmallIconHandle, BigIconHandle) not (BorderStyle in [bsDialog, bsNone]) then // bsNone as workaround for #41189
else TWSCustomFormClass(WidgetSetClass).SetIcon(Self, SmallIconHandle, BigIconHandle)
TWSCustomFormClass(WidgetSetClass).SetIcon(Self, 0, 0); else
TWSCustomFormClass(WidgetSetClass).SetIcon(Self, 0, 0);
end; end;
end; end;