[Visualizer] Add extra condition to visible check

Add an extra condition to the visibility check, which is similar to the
previous version of this check, which now guards against the window it
is hosted in not being visible.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-09 00:43:23 -07:00
parent 6179b304d0
commit fef8821cf6
1 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,10 @@
return NO; return NO;
} }
if(![self.window isVisible]) {
return NO;
}
// Might have zero opacity. // Might have zero opacity.
if(self.alphaValue == 0 || self.hiddenOrHasHiddenAncestor) { if(self.alphaValue == 0 || self.hiddenOrHasHiddenAncestor) {
return NO; return NO;