Skip to content

The SetForegroundWindow function panicks in Windows 7.#245

Open
uuhan wants to merge 3 commits into
tauri-apps:devfrom
uuhan:dev
Open

The SetForegroundWindow function panicks in Windows 7.#245
uuhan wants to merge 3 commits into
tauri-apps:devfrom
uuhan:dev

Conversation

@uuhan

@uuhan uuhan commented Apr 1, 2025

Copy link
Copy Markdown

This pr fixes the panic occurs when click the system tray in Windows 7.

I dont know if Windows 7 is still supported, but use the AttachThreadInput trick saves my Tauri app.

Referenced this thread: https://stackoverflow.com/questions/3772233/win32-setforegroundwindow-unreliable

@amrbashir amrbashir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use windows-version crate to only apply this hack on Windows 7?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants