From 8483fde975aac8833d2ce426e42fb40aeaeecba9 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 7 Feb 2022 11:30:45 -0300 Subject: [PATCH] feat(core): expose `run_return` on Linux (#3352) --- .changes/linux-run-return.md | 7 +++++++ core/tauri-runtime-wry/src/lib.rs | 1 - core/tauri-runtime/src/lib.rs | 1 - core/tauri/src/app.rs | 1 - core/tauri/src/test/mock_runtime.rs | 1 - 5 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .changes/linux-run-return.md diff --git a/.changes/linux-run-return.md b/.changes/linux-run-return.md new file mode 100644 index 000000000..f59b6cbe1 --- /dev/null +++ b/.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. diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index b4a298c14..269fe15bd 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/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(&mut self, mut callback: F) -> RunIteration { use wry::application::platform::run_return::EventLoopExtRunReturn; let windows = self.windows.clone(); diff --git a/core/tauri-runtime/src/lib.rs b/core/tauri-runtime/src/lib.rs index ddb66e683..2b27b241f 100644 --- a/core/tauri-runtime/src/lib.rs +++ b/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(&mut self, callback: F) -> RunIteration; /// Run the webview runtime. diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 21ca66224..2d8978a28 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -516,7 +516,6 @@ impl App { /// } /// } /// ``` - #[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(); diff --git a/core/tauri/src/test/mock_runtime.rs b/core/tauri/src/test/mock_runtime.rs index 954c88566..3f756e4d3 100644 --- a/core/tauri/src/test/mock_runtime.rs +++ b/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( &mut self, callback: F,