fix: avoid rendering if app is not used

This commit is contained in:
louis.pontoise authored and lwouis committed 2020-03-10 14:00:37 +09:00
1 parent 3f8e3eab9b
commit fdddb0f8ed
1 file changed
+2 -1
+2 -1
View File
@@ -46,7 +46,8 @@ class Window {
}
func refreshThumbnail() {
guard let cgImage = cgWindowId.screenshot() else { return }
guard (App.shared as! App).appIsBeingUsed,
let cgImage = cgWindowId.screenshot() else { return }
thumbnail = NSImage(cgImage: cgImage, size: NSSize(width: cgImage.width, height: cgImage.height))
}