]> git.r.bdr.sh - rbdr/captura/blobdiff - Captura/CapturaApp.swift
Add multimonitor support
[rbdr/captura] / Captura / CapturaApp.swift
index 67709a5df051374cad5322d3fe54b20fe7f7e972..00c5cc422f0e3728f24951a411c24c67ca1b9be5 100644 (file)
@@ -132,9 +132,14 @@ struct CapturaApp: App {
   
   func menuWillOpen(_ menu: NSMenu) {
     if captureState != .idle {
-      menu.cancelTracking()
+      menu.cancelTrackingWithoutAnimation()
+      if captureState == .selectingArea {
+        NotificationCenter.default.post(name: .startRecording, object: nil, userInfo: nil)
+        return
+      }
       if captureState == .recording {
         NotificationCenter.default.post(name: .stopRecording, object: nil, userInfo: nil)
+        return
       }
     }
   }