mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:52:57 +00:00
fix referencing bug (ros crashed during setup if mousemove) in co_WinPosSearchChildren
svn path=/trunk/; revision=17809
This commit is contained in:
parent
3a98addd02
commit
f5449547b6
4 changed files with 17 additions and 14 deletions
|
@ -14,9 +14,10 @@ PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu);
|
|||
DPRINT1("obj 0x%x dereffed to %i refs\n",_obj_, USER_BODY_TO_HEADER(_obj_)->RefCount-1); \
|
||||
ObmDereferenceObject2(_obj_); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define ObmDereferenceObject(_obj_) ObmDereferenceObject2(_obj_)
|
||||
|
||||
|
||||
|
||||
|
@ -59,7 +60,7 @@ PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu);
|
|||
|
||||
|
||||
VOID FASTCALL ObmReferenceObject(PVOID obj);
|
||||
BOOL FASTCALL ObmDereferenceObject(PVOID obj);
|
||||
BOOL FASTCALL ObmDereferenceObject2(PVOID obj);
|
||||
|
||||
PWINDOW_OBJECT FASTCALL IntGetWindowObject(HWND hWnd);
|
||||
PVOID FASTCALL
|
||||
|
|
|
@ -275,7 +275,7 @@ VOID FASTCALL ObmReferenceObject(PVOID obj)
|
|||
}
|
||||
|
||||
|
||||
BOOL FASTCALL ObmDereferenceObject(PVOID obj)
|
||||
BOOL FASTCALL ObmDereferenceObject2(PVOID obj)
|
||||
{
|
||||
PUSER_OBJECT_HEADER hdr = USER_BODY_TO_HEADER(obj);
|
||||
|
||||
|
|
|
@ -1483,7 +1483,10 @@ PWINDOW_OBJECT child_window_from_point(PWINDOW_OBJECT parent, int x, int y )
|
|||
}
|
||||
#endif
|
||||
|
||||
/* wine server: child_window_from_point
|
||||
|
||||
Caller must dereference the "returned" Window
|
||||
*/
|
||||
static
|
||||
VOID FASTCALL
|
||||
co_WinPosSearchChildren(
|
||||
|
@ -1522,19 +1525,19 @@ co_WinPosSearchChildren(
|
|||
continue;
|
||||
}
|
||||
|
||||
if (*Window) UserDerefObject(*Window);
|
||||
*Window = Current;
|
||||
UserRefObject(*Window);
|
||||
|
||||
if (Current->Style & WS_MINIMIZE)
|
||||
{
|
||||
*HitTest = HTCAPTION;
|
||||
UserRefObject(Current);
|
||||
break;
|
||||
}
|
||||
|
||||
if (Current->Style & WS_DISABLED)
|
||||
{
|
||||
*HitTest = HTERROR;
|
||||
UserRefObject(Current);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1561,7 +1564,6 @@ co_WinPosSearchChildren(
|
|||
co_WinPosSearchChildren(Current, OnlyHitTests, Point, Window, HitTest);
|
||||
}
|
||||
|
||||
UserRefObject(Current);
|
||||
UserDerefObjectCo(Current);
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue