Skip to content

Commit a8ddb49

Browse files
committed
fix(windows): native WinRT toast notifications and startup registration
- Query notification permission directly from backend to avoid Windows init shim latch. - Initialize process MTA and wire AUMID/shortcut registration into Tauri setup hook. - Gate first notification delivery on startup registration completion. - Propagate Toast::show() delivery errors across the IPC boundary. - Replace raw unsafe COM/shell-link calls with safe abstractions. - Preserve existing zero-by-default notification policy. Signed-off-by: ranjankai <[email protected]>
1 parent 3ee42ce commit a8ddb49

7 files changed

Lines changed: 475 additions & 682 deletions

File tree

‎desktop/src-tauri/Cargo.lock‎

Lines changed: 29 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎desktop/src-tauri/Cargo.toml‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,12 @@ user-idle = { version = "0.6", default-features = false }
6363
plist = "1"
6464

6565
[target.'cfg(windows)'.dependencies]
66-
windows-sys = { version = "0.61", features = ["Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Diagnostics_ToolHelp", "Win32_System_JobObjects", "Win32_System_Registry", "Win32_System_Threading", "Win32_Foundation", "Win32_UI_Shell"] }
66+
windows-sys = { version = "0.61", features = ["Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Diagnostics_ToolHelp", "Win32_System_JobObjects", "Win32_System_Registry", "Win32_System_Threading", "Win32_Foundation"] }
6767
keyring = { version = "3.6.3", default-features = false, features = ["windows-native", "vendored"], optional = true }
6868
user-idle = { version = "0.6", default-features = false }
69-
tauri-winrt-notification = "0.7.3"
70-
windows = { version = "0.61", features = [
71-
"Win32_Foundation",
72-
"Win32_Storage_EnhancedStorage",
73-
"Win32_System_Com",
74-
"Win32_System_Com_StructuredStorage",
75-
"Win32_UI_Shell",
76-
"Win32_UI_Shell_PropertiesSystem",
77-
] }
69+
tauri-winrt-notification = "0.7"
70+
winsafe = { version = "0.0.29", features = ["advapi", "shell"] }
71+
windows = { version = "0.61", features = ["UI_Notifications"] }
7872

7973
[dependencies]
8074
atomic-write-file = "0.3"

0 commit comments

Comments
 (0)