ソースを参照

feat(core): expose `run_return` on Linux (#3352)

Lucas Fernandes Nogueira 3 年 前
コミット
8483fde975

+ 7 - 0
.changes/linux-run-return.md

@@ -0,0 +1,7 @@
+---
+"tauri": patch
+"tauri-runtime": patch
+"tauri-runtime-wry": patch
+---
+
+The `run_return` API is now available on Linux.

+ 0 - 1
core/tauri-runtime-wry/src/lib.rs

@@ -1819,7 +1819,6 @@ impl Runtime for Wry {
       });
   }
 
-  #[cfg(any(target_os = "windows", target_os = "macos"))]
   fn run_iteration<F: FnMut(RunEvent) + 'static>(&mut self, mut callback: F) -> RunIteration {
     use wry::application::platform::run_return::EventLoopExtRunReturn;
     let windows = self.windows.clone();

+ 0 - 1
core/tauri-runtime/src/lib.rs

@@ -341,7 +341,6 @@ pub trait Runtime: Sized + 'static {
   fn set_activation_policy(&mut self, activation_policy: ActivationPolicy);
 
   /// Runs the one step of the webview runtime event loop and returns control flow to the caller.
-  #[cfg(any(target_os = "windows", target_os = "macos"))]
   fn run_iteration<F: Fn(RunEvent) + 'static>(&mut self, callback: F) -> RunIteration;
 
   /// Run the webview runtime.

+ 0 - 1
core/tauri/src/app.rs

@@ -516,7 +516,6 @@ impl<R: Runtime> App<R> {
   ///   }
   /// }
   /// ```
-  #[cfg(any(target_os = "windows", target_os = "macos"))]
   pub fn run_iteration(&mut self) -> crate::runtime::RunIteration {
     let manager = self.manager.clone();
     let app_handle = self.handle();

+ 0 - 1
core/tauri/src/test/mock_runtime.rs

@@ -561,7 +561,6 @@ impl Runtime for MockRuntime {
   #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))]
   fn set_activation_policy(&mut self, activation_policy: tauri_runtime::ActivationPolicy) {}
 
-  #[cfg(any(target_os = "windows", target_os = "macos"))]
   fn run_iteration<F: Fn(RunEvent) + 'static>(
     &mut self,
     callback: F,