mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:53:06 +00:00
[WIN32SS]
- Unconditionally enter NtUser implementation in EngCreateWnd and EngDeleteWnd CORE-7727
This commit is contained in:
parent
3e1a54151f
commit
89dbc88a2c
1 changed files with 11 additions and 28 deletions
|
@ -152,35 +152,30 @@ EngCreateWnd(
|
||||||
EWNDOBJ *Clip = NULL;
|
EWNDOBJ *Clip = NULL;
|
||||||
WNDOBJ *WndObjUser = NULL;
|
WNDOBJ *WndObjUser = NULL;
|
||||||
PWND Window;
|
PWND Window;
|
||||||
BOOL calledFromUser;
|
|
||||||
DECLARE_RETURN(WNDOBJ*);
|
|
||||||
|
|
||||||
TRACE("EngCreateWnd: pso = 0x%p, hwnd = 0x%p, pfn = 0x%p, fl = 0x%lx, pixfmt = %d\n",
|
TRACE("EngCreateWnd: pso = 0x%p, hwnd = 0x%p, pfn = 0x%p, fl = 0x%lx, pixfmt = %d\n",
|
||||||
pso, hWnd, pfn, fl, iPixelFormat);
|
pso, hWnd, pfn, fl, iPixelFormat);
|
||||||
|
|
||||||
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (fl & (WO_RGN_WINDOW | WO_RGN_DESKTOP_COORD | WO_RGN_UPDATE_ALL))
|
if (fl & (WO_RGN_WINDOW | WO_RGN_DESKTOP_COORD | WO_RGN_UPDATE_ALL))
|
||||||
{
|
{
|
||||||
FIXME("Unsupported flags: 0x%lx\n", fl & ~(WO_RGN_CLIENT_DELTA | WO_RGN_CLIENT | WO_RGN_SURFACE_DELTA | WO_RGN_SURFACE));
|
FIXME("Unsupported flags: 0x%lx\n", fl & ~(WO_RGN_CLIENT_DELTA | WO_RGN_CLIENT | WO_RGN_SURFACE_DELTA | WO_RGN_SURFACE));
|
||||||
}
|
}
|
||||||
|
|
||||||
calledFromUser = UserIsEntered();
|
|
||||||
if (!calledFromUser) {
|
|
||||||
UserEnterShared();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get window object */
|
/* Get window object */
|
||||||
Window = UserGetWindowObject(hWnd);
|
Window = UserGetWindowObject(hWnd);
|
||||||
if (Window == NULL)
|
if (Window == NULL)
|
||||||
{
|
{
|
||||||
RETURN( NULL);
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create WNDOBJ */
|
/* Create WNDOBJ */
|
||||||
Clip = EngAllocMem(FL_ZERO_MEMORY, sizeof (EWNDOBJ), GDITAG_WNDOBJ);
|
Clip = EngAllocMem(FL_ZERO_MEMORY, sizeof(EWNDOBJ), GDITAG_WNDOBJ);
|
||||||
if (Clip == NULL)
|
if (Clip == NULL)
|
||||||
{
|
{
|
||||||
ERR("Failed to allocate memory for a WND structure!\n");
|
ERR("Failed to allocate memory for a WND structure!\n");
|
||||||
RETURN( NULL);
|
goto Exit;
|
||||||
}
|
}
|
||||||
IntEngInitClipObj((XCLIPOBJ*)Clip);
|
IntEngInitClipObj((XCLIPOBJ*)Clip);
|
||||||
|
|
||||||
|
@ -188,7 +183,7 @@ EngCreateWnd(
|
||||||
if (!IntEngWndUpdateClipObj(Clip, Window))
|
if (!IntEngWndUpdateClipObj(Clip, Window))
|
||||||
{
|
{
|
||||||
EngFreeMem(Clip);
|
EngFreeMem(Clip);
|
||||||
RETURN( NULL);
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fill user object */
|
/* Fill user object */
|
||||||
|
@ -213,15 +208,9 @@ EngCreateWnd(
|
||||||
|
|
||||||
TRACE("EngCreateWnd: SUCCESS: %p!\n", WndObjUser);
|
TRACE("EngCreateWnd: SUCCESS: %p!\n", WndObjUser);
|
||||||
|
|
||||||
RETURN( WndObjUser);
|
Exit:
|
||||||
|
UserLeave();
|
||||||
CLEANUP:
|
return WndObjUser;
|
||||||
|
|
||||||
if (!calledFromUser) {
|
|
||||||
UserLeave();
|
|
||||||
}
|
|
||||||
|
|
||||||
END_CLEANUP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -235,14 +224,10 @@ EngDeleteWnd(
|
||||||
{
|
{
|
||||||
EWNDOBJ* Clip = (EWNDOBJ *)pwo;//CONTAINING_RECORD(pwo, XCLIPOBJ, WndObj);
|
EWNDOBJ* Clip = (EWNDOBJ *)pwo;//CONTAINING_RECORD(pwo, XCLIPOBJ, WndObj);
|
||||||
PWND Window;
|
PWND Window;
|
||||||
BOOL calledFromUser;
|
|
||||||
|
|
||||||
TRACE("EngDeleteWnd: pwo = 0x%p\n", pwo);
|
TRACE("EngDeleteWnd: pwo = 0x%p\n", pwo);
|
||||||
|
|
||||||
calledFromUser = UserIsEntered();
|
UserEnterExclusive();
|
||||||
if (!calledFromUser) {
|
|
||||||
UserEnterExclusive();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get window object */
|
/* Get window object */
|
||||||
Window = UserGetWindowObject(Clip->Hwnd);
|
Window = UserGetWindowObject(Clip->Hwnd);
|
||||||
|
@ -257,9 +242,7 @@ EngDeleteWnd(
|
||||||
}
|
}
|
||||||
--gcountPWO;
|
--gcountPWO;
|
||||||
|
|
||||||
if (!calledFromUser) {
|
UserLeave();
|
||||||
UserLeave();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Free resources */
|
/* Free resources */
|
||||||
IntEngFreeClipResources((XCLIPOBJ*)Clip);
|
IntEngFreeClipResources((XCLIPOBJ*)Clip);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue