X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fwin32ss%2Fuser%2Fntuser%2Fmsgqueue.c;h=eef085783bde8e4523fbfa8ce8a29b06b4a12be6;hp=aaeef187961a623bcaefc2a1c9c344df773e880d;hb=ae68a510d48cffd1267a625ab098bd1052304bd2;hpb=32351ba6e90b40b8420558e025d8f1c97f5748f7 diff --git a/reactos/win32ss/user/ntuser/msgqueue.c b/reactos/win32ss/user/ntuser/msgqueue.c index aaeef187961..eef085783bd 100644 --- a/reactos/win32ss/user/ntuser/msgqueue.c +++ b/reactos/win32ss/user/ntuser/msgqueue.c @@ -1565,10 +1565,7 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT if (pwndMsg != MessageQueue->spwndActive) { PWND pwndTop = pwndMsg; - while (pwndTop && ((pwndTop->style & (WS_POPUP|WS_CHILD)) == WS_CHILD)) - { - pwndTop = pwndTop->spwndParent; - } + pwndTop = IntGetNonChildAncestor(pwndTop); if (pwndTop && pwndTop != pwndDesktop) {