]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Configure timers to fire even when tracking mouse events
authorRoopesh Chander <roop@roopc.net>
Thu, 31 Jan 2019 11:34:34 +0000 (17:04 +0530)
committerRoopesh Chander <roop@roopc.net>
Thu, 31 Jan 2019 11:34:34 +0000 (17:04 +0530)
Signed-off-by: Roopesh Chander <roop@roopc.net>
WireGuard/WireGuard/Tunnel/TunnelsManager.swift
WireGuard/WireGuard/UI/macOS/StatusItemController.swift
WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift

index 3120f7d76cb00acba37b490d2bd4d2fda10d0f59..70b69f9b0966f3c17292221fb7685bdb95ec9c56 100644 (file)
@@ -388,7 +388,7 @@ class TunnelContainer: NSObject {
                     self.refreshStatus()
                 }
                 self.activationTimer = activationTimer
-                RunLoop.main.add(activationTimer, forMode: .default)
+                RunLoop.main.add(activationTimer, forMode: .common)
             }
         }
     }
@@ -444,7 +444,7 @@ class TunnelContainer: NSObject {
                 self.isActivateOnDemandEnabled = self.tunnelProvider.isOnDemandEnabled
             }
             self.deactivationTimer = deactivationTimer
-            RunLoop.main.add(deactivationTimer, forMode: .default)
+            RunLoop.main.add(deactivationTimer, forMode: .common)
             return
         }
         #endif
index 2568c153c9c010b27e5b5daebaae994ee3e94f5c..e401925d3e01ae9f72ce2589161c00a143742181 100644 (file)
@@ -53,7 +53,7 @@ class StatusItemController {
             self.statusItem.button?.image = self.animationImages[self.animationImageIndex]
             self.animationImageIndex = (self.animationImageIndex + 1) % self.animationImages.count
         }
-        RunLoop.main.add(timer, forMode: .default)
+        RunLoop.main.add(timer, forMode: .common)
         animationTimer = timer
     }
 
index 489e868c1d73fc0d990e71e562106c823952e577..c9cb09a7448d8faa45bbcb22aebeddf130ceaaf8 100644 (file)
@@ -254,7 +254,7 @@ class TunnelDetailTableViewController: NSViewController {
             self?.reloadRuntimeConfiguration()
         }
         reloadRuntimeConfigurationTimer = reloadTimer
-        RunLoop.main.add(reloadTimer, forMode: .default)
+        RunLoop.main.add(reloadTimer, forMode: .common)
     }
 
     func stopUpdatingRuntimeConfiguration() {