set to non-blocking

This commit is contained in:
Nickiel12 2022-07-16 21:14:00 -07:00
parent fdb60f6e00
commit a3e675def6

View file

@ -76,7 +76,7 @@ impl TrayIcon {
pub fn process_tray_messages(&self) { pub fn process_tray_messages(&self) {
unsafe { unsafe {
let mut msg = MaybeUninit::uninit(); let mut msg = MaybeUninit::uninit();
let bret = winuser::GetMessageA(msg.as_mut_ptr(), 0 as _, 0, 0); let bret = winuser::PeekMessageA(msg.as_mut_ptr(), 0 as _, 0, 0, 1);
if bret > 0 { if bret > 0 {
winuser::TranslateMessage(msg.as_ptr()); winuser::TranslateMessage(msg.as_ptr());