mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTUSER] Fix PeekMessageA for MsgFilterLow/High mouse clicks (#6427)
Fix MSO and Word Viewer not closing when "X" on title bar is clicked. This is another @I_Kill_Bugs patch. CORE-14436 , CORE-16985
This commit is contained in:
parent
acb01cf568
commit
c17a6542ac
1 changed files with 8 additions and 2 deletions
|
@ -1986,8 +1986,7 @@ co_MsqPeekHardwareMessage(IN PTHREADINFO pti,
|
|||
( Window == PWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) || // 2
|
||||
( Window != PWND_BOTTOM && UserHMGetHandle(Window) == CurrentMessage->Msg.hwnd ) || // 3
|
||||
( is_mouse_message(CurrentMessage->Msg.message) ) ) && // Null window for anything mouse.
|
||||
( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) && CurrentMessage->QS_Flags & QSflags ) ||
|
||||
( MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message ) ) )
|
||||
( CurrentMessage->QS_Flags & QSflags ) )
|
||||
{
|
||||
idSave = MessageQueue->idSysPeek;
|
||||
MessageQueue->idSysPeek = (ULONG_PTR)CurrentMessage;
|
||||
|
@ -2000,6 +1999,13 @@ co_MsqPeekHardwareMessage(IN PTHREADINFO pti,
|
|||
|
||||
UpdateKeyStateFromMsg(MessageQueue, &msg);
|
||||
AcceptMessage = co_IntProcessHardwareMessage(&msg, &Remove, &NotForUs, ExtraInfo, MsgFilterLow, MsgFilterHigh);
|
||||
|
||||
if (MsgFilterLow != 0 || MsgFilterHigh != 0)
|
||||
{
|
||||
/* Don't return message if not in range */
|
||||
if (msg.message < MsgFilterLow || msg.message > MsgFilterHigh)
|
||||
AcceptMessage = FALSE;
|
||||
}
|
||||
|
||||
if (Remove)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue