mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[NTUSER] IntWinListOwnedPopups: Exclude default IME window from the list (#5069)
And in IntShowOwnedPopups: Remove the window owner check hack as it's no longer needed. Based on my observation, the owner of the default IME window can change and it depends on the window that is being focused. CORE-18659 CORE-18768
This commit is contained in:
parent
38c0da9978
commit
0fee1fc80c
1 changed files with 12 additions and 11 deletions
|
@ -314,6 +314,15 @@ IntWinListChildren(PWND Window)
|
|||
return List;
|
||||
}
|
||||
|
||||
static BOOL
|
||||
IntWndIsDefaultIme(_In_ PWND Window)
|
||||
{
|
||||
PTHREADINFO pti = Window->head.pti;
|
||||
|
||||
return (IS_IMM_MODE() && !(pti->TIF_flags & TIF_INCLEANUP) &&
|
||||
Window == pti->spwndDefaultIme);
|
||||
}
|
||||
|
||||
HWND* FASTCALL
|
||||
IntWinListOwnedPopups(PWND Window)
|
||||
{
|
||||
|
@ -327,7 +336,7 @@ IntWinListOwnedPopups(PWND Window)
|
|||
|
||||
for (Child = Desktop->spwndChild; Child; Child = Child->spwndNext)
|
||||
{
|
||||
if (Child->spwndOwner == Window)
|
||||
if (Child->spwndOwner == Window && !IntWndIsDefaultIme(Child))
|
||||
++NumOwned;
|
||||
}
|
||||
|
||||
|
@ -342,7 +351,7 @@ IntWinListOwnedPopups(PWND Window)
|
|||
Index = 0;
|
||||
for (Child = Desktop->spwndChild; Child; Child = Child->spwndNext)
|
||||
{
|
||||
if (Child->spwndOwner == Window)
|
||||
if (Child->spwndOwner == Window && !IntWndIsDefaultIme(Child))
|
||||
List[Index++] = Child->head.h;
|
||||
}
|
||||
List[Index] = NULL;
|
||||
|
@ -2807,7 +2816,6 @@ VOID FASTCALL IntDestroyOwnedWindows(PWND Window)
|
|||
HWND* List;
|
||||
HWND* phWnd;
|
||||
PWND pWnd;
|
||||
PTHREADINFO pti = Window->head.pti;
|
||||
USER_REFERENCE_ENTRY Ref;
|
||||
|
||||
List = IntWinListOwnedPopups(Window);
|
||||
|
@ -2822,12 +2830,6 @@ VOID FASTCALL IntDestroyOwnedWindows(PWND Window)
|
|||
ASSERT(pWnd->spwndOwner == Window);
|
||||
ASSERT(pWnd != Window);
|
||||
|
||||
if (IS_IMM_MODE() && !(pti->TIF_flags & TIF_INCLEANUP) &&
|
||||
pWnd == pti->spwndDefaultIme)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
WndSetOwner(pWnd, NULL);
|
||||
if (IntWndBelongsToThread(pWnd, PsGetCurrentThreadWin32Thread()))
|
||||
{
|
||||
|
@ -4679,8 +4681,7 @@ IntShowOwnedPopups(PWND OwnerWnd, BOOL fShow )
|
|||
{
|
||||
if (!(pWnd = ValidateHwndNoErr( win_array[count] )))
|
||||
continue;
|
||||
if (pWnd->spwndOwner != OwnerWnd)
|
||||
continue;
|
||||
ASSERT(pWnd->spwndOwner == OwnerWnd);
|
||||
|
||||
if (fShow)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue