Skip to content
Snippets Groups Projects
Verified Commit 0c87572b authored by Sebastian's avatar Sebastian
Browse files

Destroy windows icon after using it

parent 91f8e53c
1 merge request!244WIP: Notifications on Windows
Pipeline #12247 passed
......@@ -41,8 +41,10 @@ class DorkboxNotifications {
val data = NOTIFYICONDATA()
data.setBalloon(title, message, 10000, NIIF_NONE or NIIF_NOSOUND)
data.setIcon(WinDef.HICON(image))
val icon = WinDef.HICON(image)
data.setIcon(icon)
val ret = Shell32.Shell_NotifyIcon(Shell32.NIM_ADD, data)
User32.INSTANCE.DestroyIcon(icon)
println("return value: $ret")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment