refactor(font): do not notify on Windows

relates to #2690
This commit is contained in:
Jan De Dobbeleer 2022-08-29 08:12:32 +02:00 committed by Jan De Dobbeleer
parent 8c7deb1ec2
commit 16d278ace3

View file

@ -66,13 +66,5 @@ func install(font *Font) (err error) {
return errors.New("unable to add font resource")
}
// Notify other applications that the fonts have changed
user32 := syscall.NewLazyDLL("user32.dll")
procSendMessageW := user32.NewProc("SendMessageW")
_, _, e1 := syscall.SyscallN(procSendMessageW.Addr(), uintptr(HWND_BROADCAST), uintptr(WM_FONTCHANGE), 0, 0)
if e1 != 0 {
return errors.New("unable to broadcast font change")
}
return nil
}