Skip to content

Commit b577f72

Browse files
committed
Fixing events on refresh updating status to avoid errors on taskbars availability
1 parent 4b5a559 commit b577f72

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

taskbar.pas

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,8 @@ procedure TTaskbars.NotifyAreaVisible(visible: Boolean);
496496
var
497497
I: Integer;
498498
begin
499+
if FUpdating then Exit;
500+
499501
for I := 0 to Count - 1 do
500502
if visible then
501503
ShowWindow(Items[I]._trayNotifyWnd.Handle, SW_SHOWNOACTIVATE)
@@ -603,6 +605,8 @@ procedure TTaskbars.RestoreAllStarts;
603605
var
604606
I: Integer;
605607
begin
608+
if FUpdating then Exit;
609+
606610
for I := 0 to Count - 1 do
607611
ShowWindow(Items[I]._start.Handle, SW_SHOWNOACTIVATE);
608612
end;
@@ -652,6 +656,8 @@ procedure TTaskbars.Transparent;
652656
accent: AccentPolicy;
653657
data: WindowCompositionAttributeData;
654658
begin
659+
if FUpdating then Exit;
660+
655661
for I := 0 to Count - 1 do
656662
begin
657663
//if _notaskbar then Exit;
@@ -687,6 +693,8 @@ procedure TTaskbars.UpdateTaskbarInfo;
687693
AMonitor: TMonitor;
688694
ABData: TAppBarData;
689695
begin
696+
if FUpdating then Exit;
697+
690698
for n := 0 to Count - 1 do
691699
begin
692700
// if _notaskbar then Exit;

0 commit comments

Comments
 (0)