This commit is contained in:
kornerr committed 2026-11-05 22:13:32 +03:00
1 parent 14d81266ac
commit 806fc92e4a
2 files changed
+3 -4

No files matched your search

+2 -3
View File
@@ -1,7 +1,7 @@
import WinSDK
func otherSetupWindowIcons(_ iconId: Int) {
// Only visit windows owned by this UI thread, never another application's window.
func otherSetupWindowIcon(_ iconId: Int) {
// Only visit windows owned by this UI thread, never another application's window
EnumThreadWindows(GetCurrentThreadId(), { wnd, iconId in
let resource = UnsafePointer<WCHAR>(bitPattern: Int(iconId))
let module = GetModuleHandleW(nil)
@@ -30,7 +30,6 @@ func otherSetupWindowIcons(_ iconId: Int) {
SendMessageW(wnd, UINT(WM_SETICON), WPARAM(ICON_BIG), LPARAM(Int(bitPattern: large)))
}
// Shared resource icons remain valid for the lifetime of the process.
return true
}, LPARAM(iconId))
}
@@ -8,7 +8,7 @@ final class HPAppDelegate {
func setup() {
otherSetupConsoleLogging(hp.ctrl, "HP")
hp.setup()
otherSetupWindowIcons(101)
otherSetupWindowIcon(101)
}
}