/* Send palette messages */
if (gpsi->PUSIFlags & PUSIF_PALETTEDISPLAY &&
- co_IntPostOrSendMessage(UserHMGetHandle(Window), WM_QUERYNEWPALETTE, 0, 0))
+ //co_IntPostOrSendMessage(UserHMGetHandle(Window), WM_QUERYNEWPALETTE, 0, 0))
+ co_IntSendMessage(UserHMGetHandle(Window), WM_QUERYNEWPALETTE, 0, 0))
{
UserSendNotifyMessage( HWND_BROADCAST,
WM_PALETTEISCHANGING,
}
}
////
+ //// CORE-1161 and CORE-6651
+ if (Window->spwndPrev)
+ {
+ HWND *phwndTopLevel, *phwndCurrent;
+ PWND pwndCurrent, pwndDesktop;
+
+ pwndDesktop = UserGetDesktopWindow();
+ if (Window->spwndParent == pwndDesktop )
+ {
+ phwndTopLevel = IntWinListChildren(pwndDesktop);
+ phwndCurrent = phwndTopLevel;
+ while(*phwndCurrent)
+ {
+ pwndCurrent = UserGetWindowObject(*phwndCurrent);
+
+ if (pwndCurrent && pwndCurrent->spwndOwner == Window )
+ {
+ co_WinPosSetWindowPos(pwndCurrent, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE);
+ }
+ phwndCurrent++;
+ }
+ ExFreePool(phwndTopLevel);
+ }
+ }
+ ////
OldTID = WindowPrev ? IntGetWndThreadId(WindowPrev) : NULL;
NewTID = IntGetWndThreadId(Window);
ptiOld = WindowPrev ? WindowPrev->head.pti : NULL;
}
}
}
- ExFreePool(List);//ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
}
}
if (WindowPrev)
{
if (pWndPrev)
{
- co_IntPostOrSendMessage(UserHMGetHandle(pWndPrev), WM_KILLFOCUS, (WPARAM)UserHMGetHandle(pWnd), 0);
+ //co_IntPostOrSendMessage(UserHMGetHandle(pWndPrev), WM_KILLFOCUS, (WPARAM)UserHMGetHandle(pWnd), 0);
+ co_IntSendMessage(UserHMGetHandle(pWndPrev), WM_KILLFOCUS, (WPARAM)UserHMGetHandle(pWnd), 0);
}
if (ThreadQueue->spwndFocus == pWnd)
{
IntNotifyWinEvent(EVENT_OBJECT_FOCUS, pWnd, OBJID_CLIENT, CHILDID_SELF, 0);
- co_IntPostOrSendMessage(UserHMGetHandle(pWnd), WM_SETFOCUS, (WPARAM)(pWndPrev ? UserHMGetHandle(pWndPrev) : NULL), 0);
+ //co_IntPostOrSendMessage(UserHMGetHandle(pWnd), WM_SETFOCUS, (WPARAM)(pWndPrev ? UserHMGetHandle(pWndPrev) : NULL), 0);
+ co_IntSendMessage(UserHMGetHandle(pWnd), WM_SETFOCUS, (WPARAM)(pWndPrev ? UserHMGetHandle(pWndPrev) : NULL), 0);
}
}
else
if (pWndPrev)
{
IntNotifyWinEvent(EVENT_OBJECT_FOCUS, NULL, OBJID_CLIENT, CHILDID_SELF, 0);
- co_IntPostOrSendMessage(UserHMGetHandle(pWndPrev), WM_KILLFOCUS, 0, 0);
+ //co_IntPostOrSendMessage(UserHMGetHandle(pWndPrev), WM_KILLFOCUS, 0, 0);
+ co_IntSendMessage(UserHMGetHandle(pWndPrev), WM_KILLFOCUS, 0, 0);
}
}
}
if (bFocus && !(ThreadQueue->QF_flags & QF_FOCUSNULLSINCEACTIVE))
{
/* Do not change focus if the window is no longer active */
- if (ThreadQueue->spwndActive == Wnd)
+ if (pti->MessageQueue->spwndActive != IntGetNonChildAncestor(pti->MessageQueue->spwndFocus))
{
- if (!ThreadQueue->spwndFocus ||
- !Wnd ||
- UserGetAncestor(ThreadQueue->spwndFocus, GA_ROOT) != Wnd)
- {
- co_UserSetFocus(Wnd);
- }
+ PWND pWndSend = pti->MessageQueue->spwndActive;
+ // Clear focus if the active window is minimized.
+ if (pWndSend && pti->MessageQueue->spwndActive->style & WS_MINIMIZE) pWndSend = NULL;
+ // Send focus messages and if so, set the focus.
+ IntSendFocusMessages( pti, pWndSend);
}
}
}
/* Check if we can set the focus to this window */
- for (pwndTop = Window; pwndTop != NULL; pwndTop = pwndTop->spwndParent)
+ //// Fixes wine win test_SetParent both "todo" line 3710 and 3720...
+ for (pwndTop = Window; pwndTop; pwndTop = pwndTop->spwndParent)
{
if (pwndTop->style & (WS_MINIMIZED|WS_DISABLED)) return 0;
if ((pwndTop->style & (WS_POPUP|WS_CHILD)) != WS_CHILD) break;
}
-
+ ////
if (co_HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)Window->head.h, (LPARAM)hWndPrev))
{
ERR("SetFocus 1 WH_CBT Call Hook return!\n");
{
if (ThreadQueue->MenuOwner && Window) ThreadQueue->QF_flags |= QF_CAPTURELOCKED;
- co_IntPostOrSendMessage(hWndPrev, WM_CAPTURECHANGED, 0, (LPARAM)hWnd);
+ //co_IntPostOrSendMessage(hWndPrev, WM_CAPTURECHANGED, 0, (LPARAM)hWnd);
+ co_IntSendMessage(hWndPrev, WM_CAPTURECHANGED, 0, (LPARAM)hWnd);
ThreadQueue->QF_flags &= ~QF_CAPTURELOCKED;
}