     ///
     /// - Parameter event: UIEvent.
     private func handleEvent(_ event: UIEvent) {
-        if event.type != .touches {
+        guard event.type == .touches else {
             return
         }
         

        context.translateBy(x: self.center.x, y: self.center.y)
        context.concatenate(self.transform)
        context.translateBy(x: -self.bounds.size.width * self.layer.anchorPoint.x, y: -self.bounds.size.height * self.layer.anchorPoint.y)
        
        if !ignoreOrientation {
            if orientation == .landscapeLeft {
                context.rotate(by: CGFloat.pi / 2)
                context.translateBy(x: 0, y: -imageSize.width)
            } else if orientation == .landscapeRight {
                context.rotate(by: -CGFloat.pi / 2)
                context.translateBy(x: -imageSize.height, y: 0)
            } else if orientation == .portraitUpsideDown {
                context.rotate(by: CGFloat.pi)
                context.translateBy(x: -imageSize.width, y: -imageSize.height)
            }
        }
        
        if self.responds(to: #selector(UIView.drawHierarchy(in:afterScreenUpdates:))) {
            self.drawHierarchy(in: self.bounds, afterScreenUpdates: false)

    /// - Parameter save: Set to true to save, otherwise false.
    /// - Returns: Returns the screenshot as an UIImage.
    public func windowScreenshot(save: Bool = false) -> UIImage? {
        let orientation: UIInterfaceOrientation = UIApplication.shared.statusBarOrientation
        
        var imageSize: CGSize = CGSize.zero
        if UIInterfaceOrientationIsPortrait(orientation) {
            imageSize = UIScreen.main.bounds.size
        } else {
            imageSize = CGSize(width: UIScreen.main.bounds.size.height, height: UIScreen.main.bounds.size.width)
