Skip to content

Commit

Permalink
fix: avoid rendering if app is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
louis.pontoise authored and lwouis committed Mar 10, 2020
1 parent 3f8e3ea commit fdddb0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion alt-tab-macos/logic/Window.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit fdddb0f

Please sign in to comment.