mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 18:56:48 +00:00
- Needed to reference the previous window handle. This prevents the window object from becoming zero during it's own demise when posting send messages.
- See bug 3490. svn path=/trunk/; revision=34408
This commit is contained in:
parent
326c138e1b
commit
69b39dc05f
1 changed files with 10 additions and 6 deletions
|
@ -60,14 +60,17 @@ co_IntSendDeactivateMessages(HWND hWndPrev, HWND hWnd)
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
co_IntSendActivateMessages(HWND hWndPrev, HWND hWnd, BOOL MouseActivate)
|
co_IntSendActivateMessages(HWND hWndPrev, HWND hWnd, BOOL MouseActivate)
|
||||||
{
|
{
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref, RefPrev;
|
||||||
PWINDOW_OBJECT Window;
|
PWINDOW_OBJECT Window, WindowPrev = NULL;
|
||||||
|
|
||||||
if ((Window = UserGetWindowObject(hWnd)))
|
if ((Window = UserGetWindowObject(hWnd)))
|
||||||
{
|
{
|
||||||
|
|
||||||
UserRefObjectCo(Window, &Ref);
|
UserRefObjectCo(Window, &Ref);
|
||||||
|
|
||||||
|
WindowPrev = UserGetWindowObject(hWndPrev);
|
||||||
|
|
||||||
|
if (WindowPrev) UserRefObjectCo(WindowPrev, &RefPrev);
|
||||||
|
|
||||||
/* Send palette messages */
|
/* Send palette messages */
|
||||||
if (co_IntPostOrSendMessage(hWnd, WM_QUERYNEWPALETTE, 0, 0))
|
if (co_IntPostOrSendMessage(hWnd, WM_QUERYNEWPALETTE, 0, 0))
|
||||||
{
|
{
|
||||||
|
@ -91,11 +94,11 @@ co_IntSendActivateMessages(HWND hWndPrev, HWND hWnd, BOOL MouseActivate)
|
||||||
Window->Wnd->Owner->hWndLastActive = hWnd;
|
Window->Wnd->Owner->hWndLastActive = hWnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Window && hWndPrev)
|
if (Window && WindowPrev)
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT cWindow;
|
PWINDOW_OBJECT cWindow;
|
||||||
HWND *List, *phWnd;
|
HWND *List, *phWnd;
|
||||||
HANDLE OldTID = IntGetWndThreadId(UserGetWindowObject(hWndPrev));
|
HANDLE OldTID = IntGetWndThreadId(WindowPrev);
|
||||||
HANDLE NewTID = IntGetWndThreadId(Window);
|
HANDLE NewTID = IntGetWndThreadId(Window);
|
||||||
|
|
||||||
DPRINT("SendActiveMessage Old -> %x, New -> %x\n", OldTID, NewTID);
|
DPRINT("SendActiveMessage Old -> %x, New -> %x\n", OldTID, NewTID);
|
||||||
|
@ -126,6 +129,7 @@ co_IntSendActivateMessages(HWND hWndPrev, HWND hWnd, BOOL MouseActivate)
|
||||||
ExFreePool(List);
|
ExFreePool(List);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
UserDerefObjectCo(WindowPrev); // Now allow the previous window to die.
|
||||||
}
|
}
|
||||||
|
|
||||||
UserDerefObjectCo(Window);
|
UserDerefObjectCo(Window);
|
||||||
|
|
Loading…
Reference in a new issue