revert(macos): restore Dock hiding when closing the window

This reverts commit 12f842d038.

Restore the Accessory activation policy when closing the main window or
using Cmd+W so the Dock icon disappears again. Keeping the Regular policy
avoided menu bar jitter but caused the Dock visibility regression in #8513.

Hiding the application before switching to Accessory did not reliably
eliminate the jitter. An isolated Tao 0.37.2 checkout with a native muda
menu reproduced it on macOS 27.2 without CVR or WebView. The responsible
layer remains undetermined and needs separate investigation.

The menu bar jitter reported in #8319 can still occur; this revert restores
Dock behavior and does not claim to fix that issue.

Closes #8513
This commit is contained in:
Tunglies
2026-11-03 00:55:35 +08:00
parent 3027e2b87f
commit ebd78ae9ff
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -316,6 +316,7 @@ pub async fn hide() {
{
let _ = window.hide();
}
handle::Handle::global().set_activation_policy_accessory();
}
#[cfg(test)]
+3
View File
@@ -289,6 +289,9 @@ pub fn run() -> std::process::ExitCode {
}
pub fn handle_window_close(api: &tauri::WindowEvent) {
#[cfg(target_os = "macos")]
handle::Handle::global().set_activation_policy_accessory();
if core::handle::Handle::global().is_exiting() {
return;
}