-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue focusing app after activating from Windows Notification #26
Comments
FYI i'm kinda working on this issue (when i have time for it) but wasn't able to make it work with the workaround you mentioned in the tauri issue. Mostly hitting |
This one works for me: https://gist.github.com/littletsu/d1c1b512d6843071144b7b89109a8de2 I changed it to 0x55 and it typed out "u" on the screen, with no https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes |
That's effectively what i was doing with the windows(-sys) crate, but i copied that gist anyway and it still gives me the same errors (and it still isn't able to transfer the focus) :( I'll put this issue on ice for now since Tauri doesn't support interactive notifications anyway. If in the meantime someone else figures out how to add it to the plugin i'll gladly take a look at PRs but i can't spend any more time on this myself right now. |
Gave it a shot and the call to I tried directly calling Which makes no sense, and I can't find anyone else who's gotten that error code calling the function. |
Ahh! It appears that |
A third wrinkle is that Tauri's let hwnd = main_window.hwnd().unwrap();
unsafe {
let success = windows::Win32::UI::WindowsAndMessaging::SetForegroundWindow(HWND(hwnd.0)).as_bool();
if !success {
warn!("SetForegroundWindow failed");
}
} |
https://github.com/RandomEngy/tauri-deep-link-focus-repro
Repro steps:
tauri_plugin_deep_link::register
with a handler that tries to callwindow.set_focus()
Expected result:
App comes to the foreground
Actual result:
App flashes in the taskbar and does not come to the foreground
The text was updated successfully, but these errors were encountered: