forked from Yadciel/c_tray
Only process messages coming from the tray window. This avoids potential bugs where the tray loop would steal messages from other windows.
This commit is contained in:
committed by
Dmitry Mikushin
parent
8dd1358b92
commit
08ac69e02a
4
tray.h
4
tray.h
@@ -319,9 +319,9 @@ static int tray_init(struct tray *tray) {
|
|||||||
static int tray_loop(int blocking) {
|
static int tray_loop(int blocking) {
|
||||||
MSG msg;
|
MSG msg;
|
||||||
if (blocking) {
|
if (blocking) {
|
||||||
GetMessage(&msg, NULL, 0, 0);
|
GetMessage(&msg, hwnd, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
|
PeekMessage(&msg, hwnd, 0, 0, PM_REMOVE);
|
||||||
}
|
}
|
||||||
if (msg.message == WM_QUIT) {
|
if (msg.message == WM_QUIT) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user