Skip to content

Commit

Permalink
Merge pull request #55 from tingyutech/fix_32bit
Browse files Browse the repository at this point in the history
Fix windows api issue on x86 architecture
  • Loading branch information
olback authored Apr 7, 2024
2 parents 606f614 + 302b2b5 commit 3a3dd57
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/api/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,15 @@ impl TrayItemWindows {
nid.hWnd = self.info.hwnd;
nid.uID = 1;
nid.uFlags = NIF_TIP;

#[cfg(target_arch = "x86")]
{
let mut tip_data = [0u16; 128];
tip_data[..wide_tooltip.len()].copy_from_slice(&wide_tooltip);
nid.szTip = tip_data;
}

#[cfg(not(target_arch = "x86"))]
nid.szTip[..wide_tooltip.len()].copy_from_slice(&wide_tooltip);

unsafe {
Expand Down

0 comments on commit 3a3dd57

Please sign in to comment.