Handy/src-tauri
Danielalnajjar ee571b6810
fix: re-assert always-on-top for overlay on Windows (#383)
* fix: re-assert always-on-top for overlay on Windows

On Windows, the recording/transcribing overlay can lose its topmost
Z-order and fall behind other windows during certain window manager
events (e.g., dragging windows, alt-tabbing, or other apps asserting
focus).

This fix uses the Win32 SetWindowPos API directly with HWND_TOPMOST
to aggressively re-assert the overlay's Z-order immediately after
showing it. Key implementation details:

- Uses Tauri 2's WebviewWindow::hwnd() to get the native handle
- Calls SetWindowPos on the main UI thread via run_on_main_thread
- Applies flags: SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_SHOWWINDOW
  - SWP_NOACTIVATE prevents stealing focus from the active window
  - SWP_SHOWWINDOW reinforces the topmost state during the show

The fix is called after .show() in both show_recording_overlay and
show_transcribing_overlay, which is more reliable than setting it
before the window is visible.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* keep the fix to windows only

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
2025-11-28 09:55:13 +07:00
..
capabilities format everything (#323) 2025-11-10 11:39:14 +08:00
gen/apple more wip but roughly is there 2025-08-01 14:15:02 -07:00
icons who knows 2025-05-09 16:07:36 -07:00
resources Improve audio feedback timing using real sound duration and trimmed WAV files (#349) 2025-11-19 10:10:23 +07:00
src fix: re-assert always-on-top for overlay on Windows (#383) 2025-11-28 09:55:13 +07:00
.gitignore basic working transcription. 2025-02-03 09:26:37 -08:00
build.rs basic working transcription. 2025-02-03 09:26:37 -08:00
Cargo.lock WIP: Add tauri-specta for generating TS bindings (#322) 2025-11-27 17:07:22 +07:00
Cargo.toml fix: re-assert always-on-top for overlay on Windows (#383) 2025-11-28 09:55:13 +07:00
Entitlements.plist working? ability to package/run on macos 2025-05-05 12:13:27 -07:00
Info.plist working? ability to package/run on macos 2025-05-05 12:13:27 -07:00
rustfmt.toml format everything (#323) 2025-11-10 11:39:14 +08:00
tauri.conf.json Release v0.6.2 2025-11-19 11:03:33 +07:00