Skip to content

Commit

Permalink
Only send visiblity change notification when the visibility actually …
Browse files Browse the repository at this point in the history
…changes (eclipse-theia#15040)

Fixes eclipse-theia#15038

Contributed by STMicroelectronics

Signed-off-by: Thomas Mäder <[email protected]>
  • Loading branch information
tsmaeder authored Feb 25, 2025
1 parent ebee2be commit 3dde0ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/core/src/browser/widgets/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ export class BaseWidget extends Widget implements PreviewableWidget {
}

override clearFlag(flag: Widget.Flag): void {
const wasVisible = this.isVisible;
super.clearFlag(flag);
if (flag === Widget.Flag.IsVisible) {
this.handleVisiblityChanged(this.isVisible);
const isVisible = this.isVisible;
if (isVisible !== wasVisible) {
this.handleVisiblityChanged(isVisible);
}
}
}
Expand Down

0 comments on commit 3dde0ac

Please sign in to comment.