diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-06 19:42:46 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-06 19:43:55 +0200 |
commit | dd04b68f32f125bb0d8e7155356d942053d978b5 (patch) | |
tree | 167161f5883f9e878e0a1325f1d524b12e66c590 | |
parent | Merge pull request #503 from zx2c4-forks/jd/notifyicon-icons (diff) | |
download | wireguard-windows-dd04b68f32f125bb0d8e7155356d942053d978b5.tar.xz wireguard-windows-dd04b68f32f125bb0d8e7155356d942053d978b5.zip |
notifyicon: remove balloon icon hack
We either need to upgrade the whole state machine to notify icon v4, or
not use this parameter. The trick here works on Windows 10, but not on
Windows 7.
-rw-r--r-- | notifyicon.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/notifyicon.go b/notifyicon.go index 0997050f..03bfdc98 100644 --- a/notifyicon.go +++ b/notifyicon.go @@ -163,15 +163,8 @@ func (ni *NotifyIcon) showMessage(title, info string, iconType uint32, icon *Ico nid.DwInfoFlags = iconType var oldIcon *Icon if iconType == win.NIIF_USER && icon != nil { - if win.GetVersion()&0xff >= 6 { - nid.HBalloonIcon = icon.hIcon - if ni.icon != nil { - nid.HIcon = ni.icon.hIcon - } - } else { - oldIcon = ni.icon - nid.HIcon = icon.hIcon - } + oldIcon = ni.icon + nid.HIcon = icon.hIcon nid.UFlags |= win.NIF_ICON } if title16, err := syscall.UTF16FromString(title); err == nil { |